@sharyn/util.exists

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

Usage no npm install needed!

<script type="module">
  import sharynUtilExists from 'https://cdn.skypack.dev/@sharyn/util.exists';
</script>

README

🌹 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