1.0.0 • Published 6 years ago
@lavadrop/ensure v1.0.0
@lavadrop/ensure
Part of a library of zero-dependency npm modules that do just one thing.
- 100% TypeScript support.
- It's not a party without
Lavadrop!
min + gzip | 139 bytes
Ensures value is defined (i.e., neither undefined nor null).
Usage
import ensure from '@lavadrop/ensure'
ensure(42)
// => 42Parameters
| Name | Type | Description |
|---|---|---|
value | T | |
message | string |
Type parameters
| Name |
|---|
T |
Returns
The original value.
Return type
NonNullable<T>1.0.0
6 years ago