Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 458 Bytes

README.md

File metadata and controls

19 lines (14 loc) · 458 Bytes

🌹 exists

exists returns true if its argument is not null or undefined.

import exists from '@sharyn/util/exists'
// or import { exists } from '@sharyn/util'

exists('a')  // true
exists('')   // true
exists(0)    // true
exists(NaN)  // true

exists(null)      // false
exists(undefined) // false
exists(void 0)    // false

exists is part of @sharyn/util