Check if an object is a dom object
npm install fd-isvdom --save
var isVdom = require('fd-isvdom');
var ifElse = require('fj-ifelse');
var hello = h('.greeting', ['Hello Vdom']);
ifElse(
isVdom(),
() => console.log('yes'),
() => console.log('no')
)(hello);
Checks if a object is a dom object
isVdom()
Parameters
Name | Type | Description |
---|---|---|
obj | * | Object to be checked |
Returns
Type | Description |
---|---|
function | A function that checks if the passed value is a virtual dom object |