@thi.ng/memoize
Advanced tools
Comparing version 1.1.8 to 2.0.0
@@ -1,7 +0,1 @@ | ||
export declare type Fn0<T> = () => T; | ||
export declare type Fn1<A, B> = (a: A) => B; | ||
export declare type Fn2<A, B, C> = (a: A, b: B) => C; | ||
export declare type Fn3<A, B, C, D> = (a: A, b: B, c: C) => D; | ||
export declare type Fn4<A, B, C, D, E> = (a: A, b: B, c: C, d: D) => E; | ||
export declare type FnAny = (...xs: any[]) => any; | ||
export interface MapLike<A, B> { | ||
@@ -8,0 +2,0 @@ has(key: A): boolean; |
112
CHANGELOG.md
@@ -6,13 +6,14 @@ # Change Log | ||
## [1.1.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.7...@thi.ng/memoize@1.1.8) (2020-01-26) | ||
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.8...@thi.ng/memoize@2.0.0) (2020-02-25) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
### Code Refactoring | ||
* **memoize:** update imports ([d6b5614](https://github.com/thi-ng/umbrella/commit/d6b56148ec3ab36f97bc3fce94d7c49a74e81e96)) | ||
### BREAKING CHANGES | ||
## [1.1.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.6...@thi.ng/memoize@1.1.7) (2020-01-24) | ||
* **memoize:** replace obsolete Fn type aliases w/ @thi.ng/api types | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
@@ -22,54 +23,4 @@ | ||
## [1.1.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.5...@thi.ng/memoize@1.1.6) (2019-11-30) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.1.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.4...@thi.ng/memoize@1.1.5) (2019-11-09) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.1.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.3...@thi.ng/memoize@1.1.4) (2019-09-21) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.1.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.2...@thi.ng/memoize@1.1.3) (2019-08-21) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.1.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.1...@thi.ng/memoize@1.1.2) (2019-07-31) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.1.0...@thi.ng/memoize@1.1.1) (2019-07-12) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.0.9...@thi.ng/memoize@1.1.0) (2019-07-07) | ||
### Bug Fixes | ||
@@ -79,3 +30,2 @@ | ||
### Features | ||
@@ -85,51 +35,4 @@ | ||
## [1.0.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.0.8...@thi.ng/memoize@1.0.9) (2019-05-22) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.0.7...@thi.ng/memoize@1.0.8) (2019-04-26) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.0.6...@thi.ng/memoize@1.0.7) (2019-04-24) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.0.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.0.5...@thi.ng/memoize@1.0.6) (2019-04-02) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@1.0.4...@thi.ng/memoize@1.0.5) (2019-03-28) | ||
**Note:** Version bump only for package @thi.ng/memoize | ||
# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@0.2.6...@thi.ng/memoize@1.0.0) (2019-01-21) | ||
### Build System | ||
@@ -139,3 +42,2 @@ | ||
### BREAKING CHANGES | ||
@@ -151,7 +53,5 @@ | ||
<a name="0.2.0"></a> | ||
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/memoize@0.1.2...@thi.ng/memoize@0.2.0) (2018-09-06) | ||
### Features | ||
@@ -161,7 +61,5 @@ | ||
<a name="0.1.0"></a> | ||
# 0.1.0 (2018-08-08) | ||
### Features | ||
@@ -168,0 +66,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { Fn0 } from "./api"; | ||
import type { Fn0 } from "@thi.ng/api"; | ||
/** | ||
@@ -3,0 +3,0 @@ * Lightweight named singleton factory, intended for hot-module |
@@ -1,2 +0,2 @@ | ||
export * from "./api"; | ||
export type * from "./api"; | ||
export * from "./defonce"; | ||
@@ -3,0 +3,0 @@ export * from "./memoize"; |
@@ -1,2 +0,3 @@ | ||
import { Fn1, Fn2, Fn3, Fn4, MapLike } from "./api"; | ||
import type { Fn, Fn2, Fn3, Fn4 } from "@thi.ng/api"; | ||
import type { MapLike } from "./api"; | ||
/** | ||
@@ -16,3 +17,3 @@ * Function memoization for arbitrary argument counts. Returns augmented | ||
*/ | ||
export declare function memoize<A, B>(fn: Fn1<A, B>, cache: MapLike<A, B>): Fn1<A, B>; | ||
export declare function memoize<A, B>(fn: Fn<A, B>, cache: MapLike<A, B>): Fn<A, B>; | ||
export declare function memoize<A, B, C>(fn: Fn2<A, B, C>, cache: MapLike<[A, B], C>): Fn2<A, B, C>; | ||
@@ -19,0 +20,0 @@ export declare function memoize<A, B, C, D>(fn: Fn3<A, B, C, D>, cache: MapLike<[A, B, C], D>): Fn3<A, B, C, D>; |
@@ -1,2 +0,3 @@ | ||
import { Fn1, MapLike } from "./api"; | ||
import type { Fn } from "@thi.ng/api"; | ||
import type { MapLike } from "./api"; | ||
/** | ||
@@ -14,3 +15,3 @@ * Optimized memoization for single arg functions. If the function | ||
*/ | ||
export declare function memoize1<A, B>(fn: Fn1<A, B>, cache?: MapLike<A, B>): (x: A) => B; | ||
export declare function memoize1<A, B>(fn: Fn<A, B>, cache?: MapLike<A, B>): (x: A) => B; | ||
//# sourceMappingURL=memoize1.d.ts.map |
@@ -1,3 +0,2 @@ | ||
import { IObjectOf } from "@thi.ng/api"; | ||
import { Fn1, Fn2, Fn3, Fn4 } from "./api"; | ||
import type { Fn, Fn2, Fn3, Fn4, IObjectOf } from "@thi.ng/api"; | ||
/** | ||
@@ -15,3 +14,3 @@ * Function memoization for arbitrary argument counts. Returns augmented | ||
*/ | ||
export declare function memoizeJ<A, B>(fn: Fn1<A, B>, cache?: IObjectOf<B>): Fn1<A, B>; | ||
export declare function memoizeJ<A, B>(fn: Fn<A, B>, cache?: IObjectOf<B>): Fn<A, B>; | ||
export declare function memoizeJ<A, B, C>(fn: Fn2<A, B, C>, cache?: IObjectOf<C>): Fn2<A, B, C>; | ||
@@ -18,0 +17,0 @@ export declare function memoizeJ<A, B, C, D>(fn: Fn3<A, B, C, D>, cache?: IObjectOf<D>): Fn3<A, B, C, D>; |
{ | ||
"name": "@thi.ng/memoize", | ||
"version": "1.1.8", | ||
"version": "2.0.0", | ||
"description": "Function memoization with configurable caching", | ||
@@ -31,13 +31,13 @@ "module": "./index.js", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@microsoft/api-extractor": "^7.7.7", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^13.5.0", | ||
"mocha": "^7.0.0", | ||
"@microsoft/api-extractor": "^7.7.8", | ||
"@types/mocha": "^7.0.1", | ||
"@types/node": "^13.7.4", | ||
"mocha": "^7.0.1", | ||
"nyc": "^15.0.0", | ||
"ts-node": "^8.6.2", | ||
"typedoc": "^0.16.8", | ||
"typescript": "^3.7.5" | ||
"typedoc": "^0.16.10", | ||
"typescript": "^3.8.2" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.7.1" | ||
"@thi.ng/api": "^6.8.0" | ||
}, | ||
@@ -58,3 +58,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "38d193103121815a5794ae242817f8f306b6ddd4" | ||
"gitHead": "b75ac2e62a828cc6ebf7b2aec4332bdf6f933a59" | ||
} |
<!-- This file is generated - DO NOT EDIT! --> | ||
# @thi.ng/memoize | ||
# ![@thi.ng/memoize](https://media.thi.ng/umbrella/banners/thing-memoize.svg?1581297777) | ||
@@ -5,0 +5,0 @@ [![npm version](https://img.shields.io/npm/v/@thi.ng/memoize.svg)](https://www.npmjs.com/package/@thi.ng/memoize) |
@@ -1,2 +0,2 @@ | ||
# ${pkg.name} | ||
# ${pkg.banner} | ||
@@ -3,0 +3,0 @@ [![npm version](https://img.shields.io/npm/v/${pkg.name}.svg)](https://www.npmjs.com/package/${pkg.name}) |
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
32127
176
Updated@thi.ng/api@^6.8.0