@lavadrop/ensure
Ensures value is defined (i.e., neither undefined nor null).
Last updated 2 years ago by jedmao .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @lavadrop/ensure 
SYNC missed versions from official npm registry.

@lavadrop/ensure

npm license Travis Build Status codecov Try @lavadrop/ensure on RunKit

Part of a library of zero-dependency npm modules that do just one thing.

npm

min + gzip | 139 bytes

source

Ensures value is defined (i.e., neither undefined nor null).

Usage

import ensure from '@lavadrop/ensure'

ensure(42)
// => 42

Parameters

Name Type Description
value T
message string

Type parameters

Name
T

Returns

The original value.

Return type

NonNullable<T>

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Total 157
Today 0
This Week 10
This Month 23
Last Day 0
Last Week 10
Last Month 3
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2021 © npmmirror.com |