Small utilities by zakodium for zakodium.
npm install @zakodium/utils
import { assertDefinedNotNull } from '@zakodium/utils';
const value: object | string | boolean | number | null | undefined = JSON.parse(someJsonString);
assertDefinedNotNull(value); // throws if value is null or undefined
// value type is object | string | boolean | number
map, filter and so on.
Could be useful when IteratorHelpers is not available. Or add some more niche helpers like chunkify.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Iteratorpipe and so on.
Could be useful until the pipe operator is not available.
https://github.com/tc39/proposal-pipeline-operator