node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

fd-isdom

fd-isDom

Build Status npm version

Check if an object is a dom object

Installation

npm install fd-isdom --save

Usage

var isDom = require('fd-isdom');
var ifElse = require('fj-ifelse');
var div = document.createElement('div');
 
ifElse(
  isDom(),
  () => console.log('yes'),
  () => console.log('no')
)(div);

API

isDom

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