deep-exists

1.0.1 • Public • Published

deep-exists

Easy checking for existence. Returns true if value is not null or undefined.

 
import exists from 'deep-exists'
 
const a = {
  b: {
    c: 4,
    d: null
  }
}
 
exists(a) // true
exists(a, 'b') // true
exists(a, 'c') // false
exists(a, 'c.a') // false
exists(a, 'b.c') // true
exists(a, 'b.d') // false
exists(a, 'b.e') // false
 

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i deep-exists

      Weekly Downloads

      2

      Version

      1.0.1

      License

      MIT

      Last publish

      Collaborators

      • str_t