@sharyn/util.defined
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

🌹 defined

defined returns true if the passed value is not undefined.

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

defined(undefined) // false
defined(void 0)    // false

defined('abc') // true
defined('')    // true
defined(0)     // true
defined(null)  // true
defined([])    // true
defined({})    // true
defined(NaN)   // true

defined is part of @sharyn/util

Readme

Keywords

none

Package Sidebar

Install

npm i @sharyn/util.defined

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

1.2 kB

Total Files

5

Last publish

Collaborators

  • sharyn