How to use the updeep.freeze function in updeep

To help you get started, we’ve selected a few updeep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github substantial / updeep / types / tests.ts View on Github external
u.map({a:1},{a:2});  // $ExpectType Mapped<{ a: number; }, { a: number; }>

u.omit('bar', { }); // $ExpectType object
u.omit(['bar'], { }); // $ExpectType object

u.omitBy([ 'banana' ], { } ); // $ExpectError

// *** constant ***

// $ExpectType { banana: number; }
u.constant({ banana: 1 })('foo');

/// *** freeze ***

// $ExpectType { potato: number; }
u.freeze({ potato: 1 });

updeep

Easily update nested frozen objects and arrays in a declarative and immutable manner.

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis