@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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i @sharyn/util.defined

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

1.2 kB

Total Files

5

Last publish

Collaborators

  • sharyn