collection-utils
Advanced tools
Comparing version
export declare const hashCodeInit = 17; | ||
export declare function addHashCode(acc: number, h: number): number; | ||
export declare function withDefault<T>(x: T | undefined, theDefault: T): T; | ||
export declare function definedMap<T, U>(x: T | undefined, f: (x: T) => U): U | undefined; | ||
@@ -4,0 +5,0 @@ export declare function hasOwnProperty(obj: object, name: string): boolean; |
@@ -17,2 +17,9 @@ "use strict"; | ||
exports.addHashCode = addHashCode; | ||
function withDefault(x, theDefault) { | ||
if (x !== undefined) { | ||
return x; | ||
} | ||
return theDefault; | ||
} | ||
exports.withDefault = withDefault; | ||
function definedMap(x, f) { | ||
@@ -19,0 +26,0 @@ if (x === undefined) |
{ | ||
"name": "collection-utils", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
33978
1.05%621
1.31%