cleverMerge(first?, second?): T | O | T & O
Attributes
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:
HashFunctionthe algorithm name or a constructor creating a hash
Returns:
Hashthe hash
Creates a hash by name or function
compileBooleanMatcher(map): boolean | ((value: string) => string)
Attributes
Compile boolean matcher.