Skip to content

0.5.1 - Creator function possibility for freezeMergeFactory

Latest
Compare
Choose a tag to compare
@tiloio tiloio released this 24 Jul 15:06

freezeMergeFactory can now be called with an object or a function.

// called with function
const randomNumber = freezeMergeFactory(() => Math.random());
randomNumber() === randomNumber() // depends on the randomness

// called with object
const randomNumber = freezeMergeFactory(Math.random());
randomNumber() === randomNumber() // is always true