@thi.ng/compose
Advanced tools
Comparing version 1.3.6 to 1.3.7
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.3.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.6...@thi.ng/compose@1.3.7) (2020-01-24) | ||
**Note:** Version bump only for package @thi.ng/compose | ||
## [1.3.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.5...@thi.ng/compose@1.3.6) (2019-11-30) | ||
@@ -8,0 +16,0 @@ |
@@ -21,3 +21,3 @@ import { Fn, FnAny } from "@thi.ng/api"; | ||
/** | ||
* Similar to `comp()`, but composes given functions in left-to-right order. | ||
* Similar to {@link (comp:1)}, but composes given functions in left-to-right order. | ||
*/ | ||
@@ -36,4 +36,5 @@ export declare function compL<A>(a: FnAny<A>): FnAny<A>; | ||
/** | ||
* @deprecated renamed to `compL` | ||
* @deprecated renamed to {@link (compL:1)} | ||
*/ | ||
export declare const compI: typeof compL; | ||
//# sourceMappingURL=comp.d.ts.map |
@@ -35,4 +35,4 @@ import { illegalArity } from "@thi.ng/errors"; | ||
/** | ||
* @deprecated renamed to `compL` | ||
* @deprecated renamed to {@link (compL:1)} | ||
*/ | ||
export const compI = compL; |
@@ -11,1 +11,2 @@ import { Fn, Fn0, Fn2, Fn3, Fn4, Fn5, Fn6, Fn7, Fn8 } from "@thi.ng/api"; | ||
export declare function complement<A, B, C, D, E, F, G, H>(f: Fn8<A, B, C, D, E, F, G, H, boolean>): Fn8<A, B, C, D, E, F, G, H, boolean>; | ||
//# sourceMappingURL=complement.d.ts.map |
import { FnAny } from "@thi.ng/api"; | ||
export declare const constantly: <T>(x: T) => FnAny<T>; | ||
//# sourceMappingURL=constantly.d.ts.map |
@@ -11,1 +11,2 @@ import { Fn0, IDeref } from "@thi.ng/api"; | ||
} | ||
//# sourceMappingURL=delay.d.ts.map |
export declare const delayed: <T>(x: T, t: number) => Promise<T>; | ||
//# sourceMappingURL=delayed.d.ts.map |
export declare const identity: <T>(x: T) => T; | ||
//# sourceMappingURL=identity.d.ts.map |
@@ -5,5 +5,6 @@ import { Fn } from "@thi.ng/api"; | ||
* | ||
* @param f | ||
* @param x | ||
* @param f - function | ||
* @param x - value | ||
*/ | ||
export declare const ifDef: <A, B>(f: Fn<A, B>, x: A | null | undefined) => B | undefined; | ||
//# sourceMappingURL=ifdef.d.ts.map |
/** | ||
* Returns f(x) iff `x` is not null or undefined. | ||
* | ||
* @param f | ||
* @param x | ||
* @param f - function | ||
* @param x - value | ||
*/ | ||
export const ifDef = (f, x) => x != null ? f(x) : undefined; |
@@ -13,1 +13,2 @@ export * from "./comp"; | ||
export * from "./trampoline"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -11,1 +11,2 @@ import { Fn } from "@thi.ng/api"; | ||
export declare function juxt<T, A, B, C, D, E, F, G, H>(a: Fn<T, A>, b: Fn<T, B>, c: Fn<T, C>, d: Fn<T, D>, e: Fn<T, E>, f: Fn<T, F>, g: Fn<T, G>, h: Fn<T, H>, ...xs: Fn<T, any>[]): Fn<T, any[]>; | ||
//# sourceMappingURL=juxt.d.ts.map |
{ | ||
"name": "@thi.ng/compose", | ||
"version": "1.3.6", | ||
"version": "1.3.7", | ||
"description": "Optimized functional composition helpers", | ||
@@ -26,17 +26,19 @@ "module": "./index.js", | ||
"doc": "node_modules/.bin/typedoc --mode modules --out doc src", | ||
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose", | ||
"pub": "yarn build:release && yarn publish --access public" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^12.12.11", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.0.0", | ||
"ts-node": "^8.5.2", | ||
"typedoc": "^0.15.2", | ||
"typescript": "^3.7.2" | ||
"@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", | ||
"nyc": "^15.0.0", | ||
"ts-node": "^8.6.2", | ||
"typedoc": "^0.16.8", | ||
"typescript": "^3.7.5" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^6.6.0", | ||
"@thi.ng/errors": "^1.2.2" | ||
"@thi.ng/api": "^6.7.0", | ||
"@thi.ng/errors": "^1.2.3" | ||
}, | ||
@@ -53,3 +55,3 @@ "keywords": [ | ||
"sideEffects": false, | ||
"gitHead": "36c4d9e967bd80ccdbfa0f4a42f594080f95f105" | ||
"gitHead": "93d8af817724c1c5b06d80ffa2492fe5b4fb7bc4" | ||
} |
@@ -11,1 +11,2 @@ import { FnAny, FnO, FnO2, FnO3, FnO4, FnO5, FnO6, FnO7, FnO8 } from "@thi.ng/api"; | ||
export declare const foo: FnAny<string>; | ||
//# sourceMappingURL=partial.d.ts.map |
@@ -34,6 +34,8 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
Package sizes (gzipped): ESM: 0.8KB / CJS: 0.9KB / UMD: 0.9KB | ||
## Dependencies | ||
- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/master/packages/api) | ||
- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/master/packages/errors) | ||
- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api) | ||
- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors) | ||
@@ -44,9 +46,9 @@ ## API | ||
- [comp()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/comp.ts) | ||
- [compL()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/comp.ts#L52) | ||
- [juxt()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/juxt.ts) | ||
- [partial()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/partial.ts) | ||
- [threadFirst()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/thread-first.ts) | ||
- [threadLast()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/thread-last.ts) | ||
- [trampoline()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/trampoline.ts) | ||
- [comp()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/comp.ts) | ||
- [compL()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/comp.ts#L52) | ||
- [juxt()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/juxt.ts) | ||
- [partial()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/partial.ts) | ||
- [threadFirst()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/thread-first.ts) | ||
- [threadLast()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/thread-last.ts) | ||
- [trampoline()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/trampoline.ts) | ||
@@ -59,2 +61,2 @@ ## Authors | ||
© 2016 - 2019 Karsten Schmidt // Apache Software License 2.0 | ||
© 2016 - 2020 Karsten Schmidt // Apache Software License 2.0 |
@@ -30,2 +30,4 @@ # ${pkg.name} | ||
${pkg.size} | ||
## Dependencies | ||
@@ -41,9 +43,9 @@ | ||
- [comp()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/comp.ts) | ||
- [compL()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/comp.ts#L52) | ||
- [juxt()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/juxt.ts) | ||
- [partial()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/partial.ts) | ||
- [threadFirst()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/thread-first.ts) | ||
- [threadLast()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/thread-last.ts) | ||
- [trampoline()](https://github.com/thi-ng/umbrella/tree/master/packages/compose/src/trampoline.ts) | ||
- [comp()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/comp.ts) | ||
- [compL()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/comp.ts#L52) | ||
- [juxt()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/juxt.ts) | ||
- [partial()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/partial.ts) | ||
- [threadFirst()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/thread-first.ts) | ||
- [threadLast()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/thread-last.ts) | ||
- [trampoline()](https://github.com/thi-ng/umbrella/tree/develop/packages/compose/src/trampoline.ts) | ||
@@ -50,0 +52,0 @@ ## Authors |
@@ -8,3 +8,4 @@ import { FnAny } from "@thi.ng/api"; | ||
* | ||
* ``` | ||
* @example | ||
* ```ts | ||
* const neg = (x) => -x; | ||
@@ -24,7 +25,8 @@ * const sub = (a, b) => a - b; | ||
* | ||
* @see threadLast | ||
* {@link threadLast} | ||
* | ||
* @param init | ||
* @param fns | ||
* @param init - start value | ||
* @param fns - functions / S-expressions | ||
*/ | ||
export declare const threadFirst: (init: any, ...fns: (FnAny<any> | [FnAny<any>, ...any[]])[]) => any; | ||
//# sourceMappingURL=thread-first.d.ts.map |
@@ -7,3 +7,4 @@ /** | ||
* | ||
* ``` | ||
* @example | ||
* ```ts | ||
* const neg = (x) => -x; | ||
@@ -23,6 +24,6 @@ * const sub = (a, b) => a - b; | ||
* | ||
* @see threadLast | ||
* {@link threadLast} | ||
* | ||
* @param init | ||
* @param fns | ||
* @param init - start value | ||
* @param fns - functions / S-expressions | ||
*/ | ||
@@ -29,0 +30,0 @@ export const threadFirst = (init, ...fns) => fns.reduce((acc, expr) => typeof expr === "function" |
@@ -8,3 +8,4 @@ import { FnAny } from "@thi.ng/api"; | ||
* | ||
* ``` | ||
* @example | ||
* ```ts | ||
* const neg = (x) => -x; | ||
@@ -24,7 +25,8 @@ * const sub = (a, b) => a - b; | ||
* | ||
* @see threadFirst | ||
* {@link threadFirst} | ||
* | ||
* @param init | ||
* @param fns | ||
* @param init - start value | ||
* @param fns - functions / S-expressions | ||
*/ | ||
export declare const threadLast: (init: any, ...fns: (FnAny<any> | [FnAny<any>, ...any[]])[]) => any; | ||
//# sourceMappingURL=thread-last.d.ts.map |
@@ -7,3 +7,4 @@ /** | ||
* | ||
* ``` | ||
* @example | ||
* ```ts | ||
* const neg = (x) => -x; | ||
@@ -23,6 +24,6 @@ * const sub = (a, b) => a - b; | ||
* | ||
* @see threadFirst | ||
* {@link threadFirst} | ||
* | ||
* @param init | ||
* @param fns | ||
* @param init - start value | ||
* @param fns - functions / S-expressions | ||
*/ | ||
@@ -29,0 +30,0 @@ export const threadLast = (init, ...fns) => fns.reduce((acc, expr) => typeof expr === "function" |
@@ -6,6 +6,8 @@ import { Fn0 } from "@thi.ng/api"; | ||
* as it returns another function/thunk. Once a non-function result has | ||
* been produced, `trampoline` returns that value itself. If the final | ||
* result should be function, it needs to wrapped (e.g. as a 1-elem | ||
* array). | ||
* been produced, `trampoline` returns that value itself. | ||
* | ||
* @remarks | ||
* If the final result should be function, it needs to wrapped (e.g. as | ||
* a 1-elem array). | ||
* | ||
* This function should be used for non-stack consuming recursion. I.e. | ||
@@ -15,3 +17,4 @@ * a trampoline is a form of continuation passing style and only ever | ||
* | ||
* ``` | ||
* @example | ||
* ```ts | ||
* const countdown = (acc, x) => | ||
@@ -29,4 +32,5 @@ * x >= 0 ? | ||
* | ||
* @param f | ||
* @param f - function | ||
*/ | ||
export declare const trampoline: <T>(f: T | Fn0<T | Fn0<T>>) => T; | ||
//# sourceMappingURL=trampoline.d.ts.map |
@@ -5,6 +5,8 @@ /** | ||
* as it returns another function/thunk. Once a non-function result has | ||
* been produced, `trampoline` returns that value itself. If the final | ||
* result should be function, it needs to wrapped (e.g. as a 1-elem | ||
* array). | ||
* been produced, `trampoline` returns that value itself. | ||
* | ||
* @remarks | ||
* If the final result should be function, it needs to wrapped (e.g. as | ||
* a 1-elem array). | ||
* | ||
* This function should be used for non-stack consuming recursion. I.e. | ||
@@ -14,3 +16,4 @@ * a trampoline is a form of continuation passing style and only ever | ||
* | ||
* ``` | ||
* @example | ||
* ```ts | ||
* const countdown = (acc, x) => | ||
@@ -28,3 +31,3 @@ * x >= 0 ? | ||
* | ||
* @param f | ||
* @param f - function | ||
*/ | ||
@@ -31,0 +34,0 @@ export const trampoline = (f) => { |
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
8835
561
60
60523
9
35
Updated@thi.ng/api@^6.7.0
Updated@thi.ng/errors@^1.2.3