@thi.ng/compose 1.4.35 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -57
- package/README.md +14 -5
- package/comp.js +1 -1
- package/index.d.ts +13 -13
- package/index.js +13 -13
- package/package.json +67 -23
- package/partial.js +1 -1
- package/lib/index.js +0 -157
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [
|
|
6
|
+
## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.1...@thi.ng/compose@2.0.2) (2021-10-15)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @thi.ng/compose
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [
|
|
14
|
+
## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.0...@thi.ng/compose@2.0.1) (2021-10-13)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @thi.ng/compose
|
|
17
17
|
|
|
@@ -19,101 +19,96 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @thi.ng/compose
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## [1.4.32](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.4.31...@thi.ng/compose@1.4.32) (2021-07-01)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @thi.ng/compose
|
|
22
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.4.36...@thi.ng/compose@2.0.0) (2021-10-12)
|
|
33
23
|
|
|
34
24
|
|
|
25
|
+
### Build System
|
|
35
26
|
|
|
27
|
+
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
36
28
|
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @thi.ng/compose
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
### BREAKING CHANGES
|
|
43
31
|
|
|
32
|
+
* discontinue CommonJS & UMD versions
|
|
44
33
|
|
|
34
|
+
- only ESM modules will be published from now on
|
|
35
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
36
|
+
- i.e. launch NodeJS via:
|
|
37
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
38
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
39
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
45
40
|
|
|
46
|
-
|
|
41
|
+
Also:
|
|
42
|
+
- normalize/restructure/reorg all package.json files
|
|
43
|
+
- cleanup all build scripts, remove obsolete
|
|
44
|
+
- switch from mocha to @thi.ng/testament for all tests
|
|
47
45
|
|
|
48
46
|
|
|
49
|
-
### Features
|
|
50
47
|
|
|
51
|
-
* **compose:** add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab7333b25c4332f783d124d86de058feceb))
|
|
52
48
|
|
|
53
49
|
|
|
54
50
|
|
|
51
|
+
# [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.12...@thi.ng/compose@1.4.0) (2020-03-28)
|
|
55
52
|
|
|
53
|
+
### Features
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
- **compose:** add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab7333b25c4332f783d124d86de058feceb))
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
# [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.5...@thi.ng/compose@1.3.0) (2019-07-07)
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
* **compose:** address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37))
|
|
63
|
-
* **compose:** enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a))
|
|
59
|
+
### Features
|
|
64
60
|
|
|
65
|
-
|
|
61
|
+
- **compose:** add ifDef() ([64aba00](https://github.com/thi-ng/umbrella/commit/64aba00))
|
|
62
|
+
- **compose:** address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37))
|
|
63
|
+
- **compose:** enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a))
|
|
66
64
|
|
|
67
|
-
|
|
65
|
+
# [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.1.2...@thi.ng/compose@1.2.0) (2019-03-10)
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
* **compose:** add trampoline() ([9e4c171](https://github.com/thi-ng/umbrella/commit/9e4c171))
|
|
67
|
+
### Features
|
|
71
68
|
|
|
72
|
-
|
|
69
|
+
- **compose:** add complement() ([5a5a2d1](https://github.com/thi-ng/umbrella/commit/5a5a2d1))
|
|
70
|
+
- **compose:** add trampoline() ([9e4c171](https://github.com/thi-ng/umbrella/commit/9e4c171))
|
|
73
71
|
|
|
74
|
-
|
|
72
|
+
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.0.2...@thi.ng/compose@1.1.0) (2019-02-15)
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
### Bug Fixes
|
|
77
75
|
|
|
78
|
-
|
|
76
|
+
- **compose:** add varargs override for jux(), add tests ([e9d57fc](https://github.com/thi-ng/umbrella/commit/e9d57fc))
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
### Features
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
- **compose:** add new functions ([dd13fa9](https://github.com/thi-ng/umbrella/commit/dd13fa9))
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.3.0...@thi.ng/compose@1.0.0) (2019-01-21)
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
### Build System
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
### BREAKING CHANGES
|
|
91
89
|
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
- all imports MUST be updated to only refer to package level
|
|
95
|
-
(not individual files anymore). tree shaking in user land will get rid of
|
|
96
|
-
all unused imported symbols.
|
|
90
|
+
- enabled multi-outputs (ES6 modules, CJS, UMD)
|
|
91
|
+
- build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
|
|
92
|
+
- all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
|
|
97
93
|
|
|
98
|
-
#
|
|
94
|
+
# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.2.2...@thi.ng/compose@0.3.0) (2018-12-27)
|
|
99
95
|
|
|
100
|
-
###
|
|
96
|
+
### Bug Fixes
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
- **compose:** fix comp() for arities >10 ([1ebfea9](https://github.com/thi-ng/umbrella/commit/1ebfea9))
|
|
103
99
|
|
|
104
|
-
###
|
|
100
|
+
### Features
|
|
105
101
|
|
|
106
|
-
|
|
102
|
+
- **compose:** add threadFirst/Last, rename compI => compL ([0061b21](https://github.com/thi-ng/umbrella/commit/0061b21))
|
|
107
103
|
|
|
108
|
-
#
|
|
104
|
+
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.1.4...@thi.ng/compose@0.2.0) (2018-10-17)
|
|
109
105
|
|
|
110
|
-
###
|
|
106
|
+
### Features
|
|
111
107
|
|
|
112
|
-
|
|
108
|
+
- **compose:** add partial(), update readme ([6851f2c](https://github.com/thi-ng/umbrella/commit/6851f2c))
|
|
113
109
|
|
|
114
|
-
|
|
115
|
-
# 0.1.0 (2018-08-24)
|
|
110
|
+
# 0.1.0 (2018-08-24)
|
|
116
111
|
|
|
117
|
-
###
|
|
112
|
+
### Features
|
|
118
113
|
|
|
119
|
-
|
|
114
|
+
- **compose:** extract comp() & juxt() to new [@thi](https://github.com/thi).ng/compose package ([ca0a04e](https://github.com/thi-ng/umbrella/commit/ca0a04e))
|
package/README.md
CHANGED
|
@@ -33,15 +33,24 @@ Optimized functional composition helpers.
|
|
|
33
33
|
yarn add @thi.ng/compose
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
+
ES module import:
|
|
37
|
+
|
|
36
38
|
```html
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
<script type="module" src="https://cdn.skypack.dev/@thi.ng/compose"></script>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[Skypack documentation](https://docs.skypack.dev/)
|
|
43
|
+
|
|
44
|
+
For Node.js REPL:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
# with flag only for < v16
|
|
48
|
+
node --experimental-repl-await
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
<script src="https://unpkg.com/@thi.ng/compose/lib/index.umd.js" crossorigin></script>
|
|
50
|
+
> const compose = await import("@thi.ng/compose");
|
|
42
51
|
```
|
|
43
52
|
|
|
44
|
-
Package sizes (gzipped, pre-treeshake): ESM:
|
|
53
|
+
Package sizes (gzipped, pre-treeshake): ESM: 825 bytes
|
|
45
54
|
|
|
46
55
|
## Dependencies
|
|
47
56
|
|
package/comp.js
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from "./comp";
|
|
2
|
-
export * from "./complement";
|
|
3
|
-
export * from "./constantly";
|
|
4
|
-
export * from "./delay";
|
|
5
|
-
export * from "./delayed";
|
|
6
|
-
export * from "./identity";
|
|
7
|
-
export * from "./ifdef";
|
|
8
|
-
export * from "./juxt";
|
|
9
|
-
export * from "./partial";
|
|
10
|
-
export * from "./promisify";
|
|
11
|
-
export * from "./thread-first";
|
|
12
|
-
export * from "./thread-last";
|
|
13
|
-
export * from "./trampoline";
|
|
1
|
+
export * from "./comp.js";
|
|
2
|
+
export * from "./complement.js";
|
|
3
|
+
export * from "./constantly.js";
|
|
4
|
+
export * from "./delay.js";
|
|
5
|
+
export * from "./delayed.js";
|
|
6
|
+
export * from "./identity.js";
|
|
7
|
+
export * from "./ifdef.js";
|
|
8
|
+
export * from "./juxt.js";
|
|
9
|
+
export * from "./partial.js";
|
|
10
|
+
export * from "./promisify.js";
|
|
11
|
+
export * from "./thread-first.js";
|
|
12
|
+
export * from "./thread-last.js";
|
|
13
|
+
export * from "./trampoline.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from "./comp";
|
|
2
|
-
export * from "./complement";
|
|
3
|
-
export * from "./constantly";
|
|
4
|
-
export * from "./delay";
|
|
5
|
-
export * from "./delayed";
|
|
6
|
-
export * from "./identity";
|
|
7
|
-
export * from "./ifdef";
|
|
8
|
-
export * from "./juxt";
|
|
9
|
-
export * from "./partial";
|
|
10
|
-
export * from "./promisify";
|
|
11
|
-
export * from "./thread-first";
|
|
12
|
-
export * from "./thread-last";
|
|
13
|
-
export * from "./trampoline";
|
|
1
|
+
export * from "./comp.js";
|
|
2
|
+
export * from "./complement.js";
|
|
3
|
+
export * from "./constantly.js";
|
|
4
|
+
export * from "./delay.js";
|
|
5
|
+
export * from "./delayed.js";
|
|
6
|
+
export * from "./identity.js";
|
|
7
|
+
export * from "./ifdef.js";
|
|
8
|
+
export * from "./juxt.js";
|
|
9
|
+
export * from "./partial.js";
|
|
10
|
+
export * from "./promisify.js";
|
|
11
|
+
export * from "./thread-first.js";
|
|
12
|
+
export * from "./thread-last.js";
|
|
13
|
+
export * from "./trampoline.js";
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/compose",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Optimized functional composition helpers",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"module": "./index.js",
|
|
6
|
-
"main": "./lib/index.js",
|
|
7
|
-
"umd:main": "./lib/index.umd.js",
|
|
8
7
|
"typings": "./index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/thi-ng/umbrella.git"
|
|
@@ -24,28 +24,22 @@
|
|
|
24
24
|
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "yarn clean &&
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"build:test": "rimraf build && tsc -p test/tsconfig.json",
|
|
31
|
-
"build:check": "tsc --isolatedModules --noEmit",
|
|
32
|
-
"test": "mocha test",
|
|
33
|
-
"cover": "nyc mocha test && nyc report --reporter=lcov",
|
|
34
|
-
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib",
|
|
35
|
-
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
|
|
36
|
-
"doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf *.js *.d.ts *.map doc",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
37
30
|
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
|
|
38
|
-
"
|
|
31
|
+
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
|
|
32
|
+
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
|
|
33
|
+
"pub": "yarn build && yarn publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
39
35
|
},
|
|
40
36
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^
|
|
42
|
-
"@thi.ng/errors": "^
|
|
37
|
+
"@thi.ng/api": "^8.0.2",
|
|
38
|
+
"@thi.ng/errors": "^2.0.2"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@thi.ng/testament": "^0.1.2"
|
|
43
42
|
},
|
|
44
|
-
"files": [
|
|
45
|
-
"*.js",
|
|
46
|
-
"*.d.ts",
|
|
47
|
-
"lib"
|
|
48
|
-
],
|
|
49
43
|
"keywords": [
|
|
50
44
|
"async",
|
|
51
45
|
"composition",
|
|
@@ -55,6 +49,56 @@
|
|
|
55
49
|
"publishConfig": {
|
|
56
50
|
"access": "public"
|
|
57
51
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=12.7"
|
|
54
|
+
},
|
|
55
|
+
"files": [
|
|
56
|
+
"*.js",
|
|
57
|
+
"*.d.ts"
|
|
58
|
+
],
|
|
59
|
+
"exports": {
|
|
60
|
+
".": {
|
|
61
|
+
"import": "./index.js"
|
|
62
|
+
},
|
|
63
|
+
"./comp": {
|
|
64
|
+
"import": "./comp.js"
|
|
65
|
+
},
|
|
66
|
+
"./complement": {
|
|
67
|
+
"import": "./complement.js"
|
|
68
|
+
},
|
|
69
|
+
"./constantly": {
|
|
70
|
+
"import": "./constantly.js"
|
|
71
|
+
},
|
|
72
|
+
"./delay": {
|
|
73
|
+
"import": "./delay.js"
|
|
74
|
+
},
|
|
75
|
+
"./delayed": {
|
|
76
|
+
"import": "./delayed.js"
|
|
77
|
+
},
|
|
78
|
+
"./identity": {
|
|
79
|
+
"import": "./identity.js"
|
|
80
|
+
},
|
|
81
|
+
"./ifdef": {
|
|
82
|
+
"import": "./ifdef.js"
|
|
83
|
+
},
|
|
84
|
+
"./juxt": {
|
|
85
|
+
"import": "./juxt.js"
|
|
86
|
+
},
|
|
87
|
+
"./partial": {
|
|
88
|
+
"import": "./partial.js"
|
|
89
|
+
},
|
|
90
|
+
"./promisify": {
|
|
91
|
+
"import": "./promisify.js"
|
|
92
|
+
},
|
|
93
|
+
"./thread-first": {
|
|
94
|
+
"import": "./thread-first.js"
|
|
95
|
+
},
|
|
96
|
+
"./thread-last": {
|
|
97
|
+
"import": "./thread-last.js"
|
|
98
|
+
},
|
|
99
|
+
"./trampoline": {
|
|
100
|
+
"import": "./trampoline.js"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"gitHead": "3c5f903104da150588946a94bb118ad559ad395d"
|
|
60
104
|
}
|
package/partial.js
CHANGED
package/lib/index.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var errors = require('@thi.ng/errors');
|
|
6
|
-
|
|
7
|
-
function comp(...fns) {
|
|
8
|
-
let [a, b, c, d, e, f, g, h, i, j] = fns;
|
|
9
|
-
switch (fns.length) {
|
|
10
|
-
case 0:
|
|
11
|
-
errors.illegalArity(0);
|
|
12
|
-
case 1:
|
|
13
|
-
return a;
|
|
14
|
-
case 2:
|
|
15
|
-
return (...xs) => a(b(...xs));
|
|
16
|
-
case 3:
|
|
17
|
-
return (...xs) => a(b(c(...xs)));
|
|
18
|
-
case 4:
|
|
19
|
-
return (...xs) => a(b(c(d(...xs))));
|
|
20
|
-
case 5:
|
|
21
|
-
return (...xs) => a(b(c(d(e(...xs)))));
|
|
22
|
-
case 6:
|
|
23
|
-
return (...xs) => a(b(c(d(e(f(...xs))))));
|
|
24
|
-
case 7:
|
|
25
|
-
return (...xs) => a(b(c(d(e(f(g(...xs)))))));
|
|
26
|
-
case 8:
|
|
27
|
-
return (...xs) => a(b(c(d(e(f(g(h(...xs))))))));
|
|
28
|
-
case 9:
|
|
29
|
-
return (...xs) => a(b(c(d(e(f(g(h(i(...xs)))))))));
|
|
30
|
-
case 10:
|
|
31
|
-
default:
|
|
32
|
-
const fn = (...xs) => a(b(c(d(e(f(g(h(i(j(...xs))))))))));
|
|
33
|
-
return fns.length === 10 ? fn : comp(fn, ...fns.slice(10));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function compL(...fns) {
|
|
37
|
-
return comp.apply(null, fns.reverse());
|
|
38
|
-
}
|
|
39
|
-
const compI = compL;
|
|
40
|
-
|
|
41
|
-
function complement(f) {
|
|
42
|
-
return (...xs) => !f(...xs);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const constantly = (x) => () => x;
|
|
46
|
-
|
|
47
|
-
const delay = (body) => new Delay(body);
|
|
48
|
-
class Delay {
|
|
49
|
-
constructor(body) {
|
|
50
|
-
this.body = body;
|
|
51
|
-
this.realized = false;
|
|
52
|
-
}
|
|
53
|
-
deref() {
|
|
54
|
-
if (!this.realized) {
|
|
55
|
-
this.value = this.body();
|
|
56
|
-
this.realized = true;
|
|
57
|
-
}
|
|
58
|
-
return this.value;
|
|
59
|
-
}
|
|
60
|
-
isRealized() {
|
|
61
|
-
return this.realized;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const delayed = (x, t) => new Promise((resolve) => setTimeout(() => resolve(x), t));
|
|
66
|
-
|
|
67
|
-
const identity = (x) => x;
|
|
68
|
-
|
|
69
|
-
const ifDef = (f, x) => x != null ? f(x) : undefined;
|
|
70
|
-
|
|
71
|
-
function juxt(...fns) {
|
|
72
|
-
const [a, b, c, d, e, f, g, h] = fns;
|
|
73
|
-
switch (fns.length) {
|
|
74
|
-
case 1:
|
|
75
|
-
return (x) => [a(x)];
|
|
76
|
-
case 2:
|
|
77
|
-
return (x) => [a(x), b(x)];
|
|
78
|
-
case 3:
|
|
79
|
-
return (x) => [a(x), b(x), c(x)];
|
|
80
|
-
case 4:
|
|
81
|
-
return (x) => [a(x), b(x), c(x), d(x)];
|
|
82
|
-
case 5:
|
|
83
|
-
return (x) => [a(x), b(x), c(x), d(x), e(x)];
|
|
84
|
-
case 6:
|
|
85
|
-
return (x) => [a(x), b(x), c(x), d(x), e(x), f(x)];
|
|
86
|
-
case 7:
|
|
87
|
-
return (x) => [a(x), b(x), c(x), d(x), e(x), f(x), g(x)];
|
|
88
|
-
case 8:
|
|
89
|
-
return (x) => [a(x), b(x), c(x), d(x), e(x), f(x), g(x), h(x)];
|
|
90
|
-
default:
|
|
91
|
-
return (x) => {
|
|
92
|
-
let res = new Array(fns.length);
|
|
93
|
-
for (let i = fns.length; --i >= 0;) {
|
|
94
|
-
res[i] = fns[i](x);
|
|
95
|
-
}
|
|
96
|
-
return res;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function partial(fn, ...args) {
|
|
102
|
-
let [a, b, c, d, e, f, g, h] = args;
|
|
103
|
-
switch (args.length) {
|
|
104
|
-
case 1:
|
|
105
|
-
return (...xs) => fn(a, ...xs);
|
|
106
|
-
case 2:
|
|
107
|
-
return (...xs) => fn(a, b, ...xs);
|
|
108
|
-
case 3:
|
|
109
|
-
return (...xs) => fn(a, b, c, ...xs);
|
|
110
|
-
case 4:
|
|
111
|
-
return (...xs) => fn(a, b, c, d, ...xs);
|
|
112
|
-
case 5:
|
|
113
|
-
return (...xs) => fn(a, b, c, d, e, ...xs);
|
|
114
|
-
case 6:
|
|
115
|
-
return (...xs) => fn(a, b, c, d, e, f, ...xs);
|
|
116
|
-
case 7:
|
|
117
|
-
return (...xs) => fn(a, b, c, d, e, f, g, ...xs);
|
|
118
|
-
case 8:
|
|
119
|
-
return (...xs) => fn(a, b, c, d, e, f, g, h, ...xs);
|
|
120
|
-
default:
|
|
121
|
-
errors.illegalArgs();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const promisify = (fn) => new Promise((resolve, reject) => fn((err, result) => (err != null ? reject(err) : resolve(result))));
|
|
126
|
-
|
|
127
|
-
const threadFirst = (init, ...fns) => fns.reduce((acc, expr) => typeof expr === "function"
|
|
128
|
-
? expr(acc)
|
|
129
|
-
: expr[0](acc, ...expr.slice(1)), init);
|
|
130
|
-
|
|
131
|
-
const threadLast = (init, ...fns) => fns.reduce((acc, expr) => typeof expr === "function"
|
|
132
|
-
? expr(acc)
|
|
133
|
-
: expr[0](...expr.slice(1), acc), init);
|
|
134
|
-
|
|
135
|
-
const trampoline = (f) => {
|
|
136
|
-
while (typeof f === "function") {
|
|
137
|
-
f = f();
|
|
138
|
-
}
|
|
139
|
-
return f;
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
exports.Delay = Delay;
|
|
143
|
-
exports.comp = comp;
|
|
144
|
-
exports.compI = compI;
|
|
145
|
-
exports.compL = compL;
|
|
146
|
-
exports.complement = complement;
|
|
147
|
-
exports.constantly = constantly;
|
|
148
|
-
exports.delay = delay;
|
|
149
|
-
exports.delayed = delayed;
|
|
150
|
-
exports.identity = identity;
|
|
151
|
-
exports.ifDef = ifDef;
|
|
152
|
-
exports.juxt = juxt;
|
|
153
|
-
exports.partial = partial;
|
|
154
|
-
exports.promisify = promisify;
|
|
155
|
-
exports.threadFirst = threadFirst;
|
|
156
|
-
exports.threadLast = threadLast;
|
|
157
|
-
exports.trampoline = trampoline;
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../comp.js","../complement.js","../constantly.js","../delay.js","../delayed.js","../identity.js","../ifdef.js","../juxt.js","../partial.js","../promisify.js","../thread-first.js","../thread-last.js","../tramp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,YAAYC,kBAAW,EAAE,CAAC;AAC1B,KAAK;AACL;;ACLY,MAAC,SAAS,GAAG,CAAC,EAAE,KAAK,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,MAAM,GAAG,IAAI,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;;ACSxH,MAAC,WAAW,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,IAAI,KAAK,UAAU;AACjG,MAAM,IAAI,CAAC,GAAG,CAAC;AACf,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI;;ACF9B,MAAC,UAAU,GAAG,CAAC,IAAI,EAAE,GAAG,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,OAAO,IAAI,KAAK,UAAU;AAChG,MAAM,IAAI,CAAC,GAAG,CAAC;AACf,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI;;ACC9B,MAAC,UAAU,GAAG,CAAC,CAAC,KAAK;AACjC,IAAI,OAAO,OAAO,CAAC,KAAK,UAAU,EAAE;AACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,OAAO,CAAC,CAAC;AACb;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@thi.ng/errors")):"function"==typeof define&&define.amd?define(["exports","@thi.ng/errors"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).thi=e.thi||{},e.thi.ng=e.thi.ng||{},e.thi.ng.compose={}),e.thi.ng.errors)}(this,(function(e,t){"use strict";function r(...e){let[n,s,i,u,c,a,l,o,f,d]=e;switch(e.length){case 0:t.illegalArity(0);case 1:return n;case 2:return(...e)=>n(s(...e));case 3:return(...e)=>n(s(i(...e)));case 4:return(...e)=>n(s(i(u(...e))));case 5:return(...e)=>n(s(i(u(c(...e)))));case 6:return(...e)=>n(s(i(u(c(a(...e))))));case 7:return(...e)=>n(s(i(u(c(a(l(...e)))))));case 8:return(...e)=>n(s(i(u(c(a(l(o(...e))))))));case 9:return(...e)=>n(s(i(u(c(a(l(o(f(...e)))))))));case 10:default:const h=(...e)=>n(s(i(u(c(a(l(o(f(d(...e))))))))));return 10===e.length?h:r(h,...e.slice(10))}}function n(...e){return r.apply(null,e.reverse())}const s=n;class i{constructor(e){this.body=e,this.realized=!1}deref(){return this.realized||(this.value=this.body(),this.realized=!0),this.value}isRealized(){return this.realized}}e.Delay=i,e.comp=r,e.compI=s,e.compL=n,e.complement=function(e){return(...t)=>!e(...t)},e.constantly=e=>()=>e,e.delay=e=>new i(e),e.delayed=(e,t)=>new Promise((r=>setTimeout((()=>r(e)),t))),e.identity=e=>e,e.ifDef=(e,t)=>null!=t?e(t):void 0,e.juxt=function(...e){const[t,r,n,s,i,u,c,a]=e;switch(e.length){case 1:return e=>[t(e)];case 2:return e=>[t(e),r(e)];case 3:return e=>[t(e),r(e),n(e)];case 4:return e=>[t(e),r(e),n(e),s(e)];case 5:return e=>[t(e),r(e),n(e),s(e),i(e)];case 6:return e=>[t(e),r(e),n(e),s(e),i(e),u(e)];case 7:return e=>[t(e),r(e),n(e),s(e),i(e),u(e),c(e)];case 8:return e=>[t(e),r(e),n(e),s(e),i(e),u(e),c(e),a(e)];default:return t=>{let r=new Array(e.length);for(let n=e.length;--n>=0;)r[n]=e[n](t);return r}}},e.partial=function(e,...r){let[n,s,i,u,c,a,l,o]=r;switch(r.length){case 1:return(...t)=>e(n,...t);case 2:return(...t)=>e(n,s,...t);case 3:return(...t)=>e(n,s,i,...t);case 4:return(...t)=>e(n,s,i,u,...t);case 5:return(...t)=>e(n,s,i,u,c,...t);case 6:return(...t)=>e(n,s,i,u,c,a,...t);case 7:return(...t)=>e(n,s,i,u,c,a,l,...t);case 8:return(...t)=>e(n,s,i,u,c,a,l,o,...t);default:t.illegalArgs()}},e.promisify=e=>new Promise(((t,r)=>e(((e,n)=>null!=e?r(e):t(n))))),e.threadFirst=(e,...t)=>t.reduce(((e,t)=>"function"==typeof t?t(e):t[0](e,...t.slice(1))),e),e.threadLast=(e,...t)=>t.reduce(((e,t)=>"function"==typeof t?t(e):t[0](...t.slice(1),e)),e),e.trampoline=e=>{for(;"function"==typeof e;)e=e();return e},Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/index.umd.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../comp.js","../complement.js","../constantly.js","../delay.js","../delayed.js","../identity.js","../ifdef.js","../juxt.js","../partial.js","../promisify.js","../thread-first.js","../thread-last.js","../trampoline.js"],"sourcesContent":null,"names":["illegalArity","illegalArgs"],"mappings":";;;;;;IACO,SAAS,IAAI,CAAC,GAAG,GAAG,EAAE;IAC7B,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC;IAC7C,IAAI,QAAQ,GAAG,CAAC,MAAM;IACtB,QAAQ,KAAK,CAAC;IACd,YAAYA,mBAAY,CAAC,CAAC,CAAC,CAAC;IAC5B,QAAQ,KAAK,CAAC;IACd,YAAY,OAAO,CAAC,CAAC;IACrB,QAAQ,KAAK,CAAC;IACd,YAAY,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,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