On this page

cleverMerge(first?, second?): T | O | T
Attributes
first:<null> | <T>
first object
second:<null> | <O>
second object
Returns:
<T> | <O> | <T> & <O> merged object of first and second object

Merges two given objects and caches the result to avoid computation if same objects passed as arguments again.

// performs cleverMerge(first, second), stores the result in WeakMap and returns result
cachedCleverMerge({a: 1}, {a: 2})
{a: 2}
 // when same arguments passed, gets the result from WeakMap and returns it.
cachedCleverMerge({a: 1}, {a: 2})
{a: 2}

createHash(algorithm): Hash
Attributes
algorithm:<HashFunction>
the algorithm name or a constructor creating a hash
Returns:<Hash>
the hash

Creates a hash by name or function


compileBooleanMatcher(map): void

Compile boolean matcher.