@wixc3/common
Advanced tools
Comparing version 16.1.3 to 16.2.0
@@ -19,2 +19,3 @@ /** | ||
export * from './maps'; | ||
export * from './partition'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -35,2 +35,3 @@ "use strict"; | ||
__exportStar(require("./maps"), exports); | ||
__exportStar(require("./partition"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -19,2 +19,3 @@ /** | ||
export * from './maps'; | ||
export * from './partition'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -19,2 +19,3 @@ /** | ||
export * from './maps'; | ||
export * from './partition'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@wixc3/common", | ||
"version": "16.1.3", | ||
"version": "16.2.0", | ||
"description": "Common utils, usable in all environments", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -101,2 +101,3 @@ [![npm version](https://badge.fury.io/js/@wixc3%2Fcommon.svg)](https://badge.fury.io/js/@wixc3%2Fcommon) | ||
| [once(fn)](https://wixplosives.github.io/core3-utils/common.once) | Make a function executable only once, following calls are ignored | | ||
| [partition(data, bucketsCount, predicate)](https://wixplosives.github.io/core3-utils/common.partition) | Partition unordered data into buckets of similar total weight | | ||
| [pick(record, keys)](https://wixplosives.github.io/core3-utils/common.pick) | returns an object composed of the picked object properties | | ||
@@ -103,0 +104,0 @@ | [prev(iterable, item)](https://wixplosives.github.io/core3-utils/common.prev) | Find the element before an item | |
@@ -95,3 +95,3 @@ import { sleep } from 'promise-assist'; | ||
/** | ||
* | ||
* | ||
* @param fn a function to memoize | ||
@@ -103,3 +103,3 @@ * @param argsHash a function that returns a string hash for the arguments, defaults to JSON.stringify | ||
fn: T, | ||
argsHash: (args: Parameters<T>) => string = JSON.stringify | ||
argsHash: (args: Parameters<T>) => string = JSON.stringify, | ||
): T & { __cache: Map<string, ReturnType<T>> } { | ||
@@ -116,4 +116,4 @@ const __cache = new Map<string, ReturnType<T>>(); | ||
}) as T, | ||
{ __cache } | ||
{ __cache }, | ||
); | ||
} | ||
} |
@@ -19,1 +19,2 @@ /** | ||
export * from './maps'; | ||
export * from './partition'; |
@@ -125,2 +125,2 @@ import chai, { expect } from 'chai'; | ||
}); | ||
}); | ||
}); |
{ | ||
"extends": "../../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "../dist/cjs" | ||
} | ||
"outDir": "../dist/cjs", | ||
}, | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
378716
177
6482
171