Check if an object is a dom object
npm install fd-isdom --save
var isDom = require('fd-isdom');
var ifElse = require('fj-ifelse');
var div = document.createElement('div');
ifElse(
isDom(),
() => console.log('yes'),
() => console.log('no')
)(div);
Checks if a object is a dom object
isDom()
Parameters
Name | Type | Description |
---|---|---|
obj | * | Object to be checked |
Returns
Type | Description |
---|---|
function | A function that checks if the passed value is a dom object |