@nestjs-crud/util
v2.2.2
Published
NestJs CRUD for RESTful APIs - util
Maintainers
Readme
Install
npm i @nestjs-crud/utilUsage
@nestjs-crud/util provides tiny type-guard utilities (isNil, isArrayFull, isObject, etc.) used across the other @nestjs-crud/* packages. Most consumers will never import this directly — it's pulled in transitively by @nestjs-crud/core and the adapter packages.
import { isNil, isArrayFull } from '@nestjs-crud/util';
if (!isNil(value)) {
// value is non-null and non-undefined
}
if (isArrayFull(items)) {
// items is an array with at least one element
}See also
- @nestjs-crud/core — the framework that consumes these utilities
- Project README and Wiki
- v2 Migration guide
