A lightweight zero-dependency library that provides utilities that work on both browser and Node contexts.
The installation is pretty straightforward. Just run:
npm install isoutils --saveand you're ready to go!
Delete undefined properties from an object:
import isoutils from 'isoutils';
let objWithUndefineds = {
optionalProp: undefined,
requiredProp: "It works!"
};
isoutils.removeUndefined(objWithUndefineds);Make a type Partial recursively
import type { DeepPartial } from 'isoutils';
function defineConfig(config?: DeepPartial<MyConfig>): MyConfig {
}Make a type Required recursively
import type { DeepRequired } from 'isoutils';
function defineConfig(config?: DeepRequired<MyConfig>): MyConfig {
}