https://github.com/drewmrk/null-undefined-guard
Guard against null or undefined values
https://github.com/drewmrk/null-undefined-guard
checking guard javascript null typescript undefined
Last synced: 4 days ago
JSON representation
Guard against null or undefined values
- Host: GitHub
- URL: https://github.com/drewmrk/null-undefined-guard
- Owner: drewmrk
- License: mit
- Created: 2021-05-29T01:57:46.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2026-03-13T17:44:03.000Z (23 days ago)
- Last Synced: 2026-03-14T05:50:18.064Z (23 days ago)
- Topics: checking, guard, javascript, null, typescript, undefined
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/null-undefined-guard
- Size: 109 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# null-undefined-guard
Guard against null and undefined values
## Examples/Usage
```js
import nullUndefinedGuard from 'null-undefined-guard'
nullUndefinedGuard(element, name?, logic?)
let e = [3, 4, 5]
nullUndefinedGuard(e, 'Array', () => {
console.log('Test')
return e
})
nullUndefinedGuard(e).push(46)
```