@thi.ng/pointfree 3.0.7 → 3.1.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 CHANGED
@@ -1,163 +1,314 @@
1
1
  # Change Log
2
2
 
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
+
3
6
  All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
+
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
11
+
12
+ ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@3.1.0) (2021-11-17)
13
+
14
+ #### 🚀 Features
15
+
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
5
21
 
6
- ## [3.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@3.0.6...@thi.ng/pointfree@3.0.7) (2021-11-03)
22
+ #### ♻️ Refactoring
7
23
 
8
- **Note:** Version bump only for package @thi.ng/pointfree
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
9
30
 
31
+ ### [3.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@3.0.1) (2021-10-13)
10
32
 
33
+ #### ♻️ Refactoring
11
34
 
35
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
36
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
37
+ - add .js suffix for all relative imports
12
38
 
39
+ # [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@3.0.0) (2021-10-12)
13
40
 
14
- # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@2.0.36...@thi.ng/pointfree@3.0.0) (2021-10-12)
41
+ #### 🛑 Breaking changes
15
42
 
43
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
44
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
45
+ - only ESM modules will be published from now on
46
+ - CJS obsolete due to ESM support in recent versions of node:
47
+ - i.e. launch NodeJS via:
48
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
49
+ - in the node REPL use `await import(...)` instead of `require()`
50
+ - UMD obsolete due to widespread browser support for ESM
51
+ Also:
52
+ - normalize/restructure/reorg all package.json files
53
+ - cleanup all build scripts, remove obsolete
54
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
16
55
 
17
- ### Build System
56
+ #### ♻️ Refactoring
18
57
 
19
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
58
+ - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
59
+ - largely related to recent updates/restructuring of these packages:
60
+ - api
61
+ - defmulti
62
+ - errors
63
+ - logger
64
+ - update imports ([138571a](https://github.com/thi-ng/umbrella/commit/138571a))
65
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
66
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
20
67
 
68
+ ### [2.0.18](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@2.0.18) (2020-12-07)
21
69
 
22
- ### BREAKING CHANGES
70
+ #### ♻️ Refactoring
23
71
 
24
- * discontinue CommonJS & UMD versions
72
+ - update type-only imports ([34bb05c](https://github.com/thi-ng/umbrella/commit/34bb05c))
73
+ - update type-only imports in various tests/pkgs ([3fd9c24](https://github.com/thi-ng/umbrella/commit/3fd9c24))
25
74
 
26
- - only ESM modules will be published from now on
27
- - CJS obsolete due to ESM support in recent versions of node:
28
- - i.e. launch NodeJS via:
29
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
30
- - in the node REPL use `await import(...)` instead of `require()`
31
- - UMD obsolete due to widespread browser support for ESM
75
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@2.0.0) (2020-04-16)
32
76
 
33
- Also:
34
- - normalize/restructure/reorg all package.json files
35
- - cleanup all build scripts, remove obsolete
36
- - switch from mocha to @thi.ng/testament for all tests
77
+ #### 🛑 Breaking changes
37
78
 
79
+ - add new words, rename HOF words ([0d19c9a](https://github.com/thi-ng/umbrella/commit/0d19c9a))
80
+ - BREAKING CHANGE: rename HOF words
81
+ - add `def` prefix for all HOF words ([#210](https://github.com/thi-ng/umbrella/issues/210))
82
+ - word/U => defWord/U
83
+ - tuple => defTuple
84
+ - join => defJoin
85
+ - op1/2/2v => defOp1/2/2v
86
+ - cond => defCond
87
+ - cases => defCases
88
+ - loadkey => defLoadKey
89
+ - storekey => defStoreKey
90
+ - loop => defLoop
91
+ - push => defPush
92
+ - add new plain words: catr, join
38
93
 
94
+ ## [1.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.3.0) (2020-03-29)
39
95
 
96
+ #### 🚀 Features
40
97
 
98
+ - add $try word, update compile() to allow empty quotations ([41de106](https://github.com/thi-ng/umbrella/commit/41de106))
99
+ - add tojson()/fromjson() conversion ops ([829f3ab](https://github.com/thi-ng/umbrella/commit/829f3ab))
100
+ - add whenq(), ismatch() ([44ab1d7](https://github.com/thi-ng/umbrella/commit/44ab1d7))
41
101
 
102
+ ### [1.2.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.2.6) (2020-02-25)
42
103
 
43
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@1.3.3...@thi.ng/pointfree@2.0.0) (2020-04-16)
104
+ #### ♻️ Refactoring
44
105
 
45
- ### Features
106
+ - update imports ([fad6887](https://github.com/thi-ng/umbrella/commit/fad6887))
46
107
 
47
- - **pointfree:** add new words, rename HOF words ([0d19c9a](https://github.com/thi-ng/umbrella/commit/0d19c9a23de3fc4188d8d0329783211f5013716b)), closes [#210](https://github.com/thi-ng/umbrella/issues/210)
108
+ ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.2.0) (2019-08-21)
48
109
 
49
- ### BREAKING CHANGES
110
+ #### 🚀 Features
50
111
 
51
- - **pointfree:** rename HOF words
112
+ - add new r-stack words, refactor ([dbad162](https://github.com/thi-ng/umbrella/commit/dbad162))
113
+ - add rdup2, rdup3, rover
52
114
 
53
- # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@1.2.10...@thi.ng/pointfree@1.3.0) (2020-03-29)
115
+ #### ♻️ Refactoring
54
116
 
55
- ### Features
117
+ - update op2v, extract loops ([6392657](https://github.com/thi-ng/umbrella/commit/6392657))
118
+ - update core stack fns (re-use) ([a7ebb2f](https://github.com/thi-ng/umbrella/commit/a7ebb2f))
119
+ - split into separate files ([86a27e5](https://github.com/thi-ng/umbrella/commit/86a27e5))
56
120
 
57
- - **pointfree:** add $try word, update compile() to allow empty quotations ([41de106](https://github.com/thi-ng/umbrella/commit/41de106e776ad102e827ccc062a19a4e637613a0))
58
- - **pointfree:** add tojson()/fromjson() conversion ops ([829f3ab](https://github.com/thi-ng/umbrella/commit/829f3ab129084619c05b434732b46b6c26d32b5e))
59
- - **pointfree:** add whenq(), ismatch() ([44ab1d7](https://github.com/thi-ng/umbrella/commit/44ab1d7f5ff52a9226b873b42adada3eac1674e9))
121
+ ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.1.0) (2019-07-07)
60
122
 
61
- # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@1.1.3...@thi.ng/pointfree@1.2.0) (2019-08-21)
123
+ #### 🚀 Features
62
124
 
63
- ### Features
125
+ - enable TS strict compiler flags (refactor) ([1f9d155](https://github.com/thi-ng/umbrella/commit/1f9d155))
64
126
 
65
- - **pointfree:** add new r-stack words, refactor ([dbad162](https://github.com/thi-ng/umbrella/commit/dbad162))
127
+ #### ♻️ Refactoring
66
128
 
67
- # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@1.0.14...@thi.ng/pointfree@1.1.0) (2019-07-07)
129
+ - address TS strictNullChecks flag ([50bf59a](https://github.com/thi-ng/umbrella/commit/50bf59a))
68
130
 
69
- ### Features
131
+ ### [1.0.14](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.0.14) (2019-05-22)
70
132
 
71
- - **pointfree:** enable TS strict compiler flags (refactor) ([1f9d155](https://github.com/thi-ng/umbrella/commit/1f9d155))
133
+ #### 🩹 Bug fixes
72
134
 
73
- ## [1.0.14](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@1.0.13...@thi.ng/pointfree@1.0.14) (2019-05-22)
135
+ - update safeMode handling ([d27bcba](https://github.com/thi-ng/umbrella/commit/d27bcba))
136
+ - actually disable checks if safeMode(false) is called
74
137
 
75
- ### Bug Fixes
138
+ ### [1.0.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.0.7) (2019-03-10)
76
139
 
77
- - **pointfree:** update safeMode handling ([d27bcba](https://github.com/thi-ng/umbrella/commit/d27bcba))
140
+ #### ♻️ Refactoring
78
141
 
79
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.8.15...@thi.ng/pointfree@1.0.0) (2019-01-21)
142
+ - re-use type aliases from [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/main/packages/api) ([0d2fdff](https://github.com/thi-ng/umbrella/commit/0d2fdff))
80
143
 
81
- ### Build System
144
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@1.0.0) (2019-01-21)
145
+
146
+ #### 🛑 Breaking changes
82
147
 
83
148
  - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
149
+ - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
150
+ - build scripts now first build ES6 modules in package root, then call
151
+ `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
152
+ - all imports MUST be updated to only refer to package level
153
+ (not individual files anymore). tree shaking in user land will get rid of
154
+ all unused imported symbols.
155
+
156
+ ### [0.8.15](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.8.15) (2018-12-27)
157
+
158
+ #### ♻️ Refactoring
159
+
160
+ - re-use comp() from [@thi.ng/compose](https://github.com/thi-ng/umbrella/tree/main/packages/compose) ([3f9b244](https://github.com/thi-ng/umbrella/commit/3f9b244))
161
+
162
+ ### [0.8.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.8.6) (2018-08-01)
84
163
 
85
- ### BREAKING CHANGES
164
+ #### ♻️ Refactoring
86
165
 
87
- - enabled multi-outputs (ES6 modules, CJS, UMD)
88
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
89
- - 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.
166
+ - TS3.0 PropertyKey handling ([bf2a307](https://github.com/thi-ng/umbrella/commit/bf2a307))
90
167
 
91
- # [0.8.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.7.10...@thi.ng/pointfree@0.8.0) (2018-05-13)
168
+ ## [0.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.8.0) (2018-05-13)
92
169
 
93
- ### Features
170
+ #### 🚀 Features
94
171
 
95
- - **pointfree:** add execjs for host calls, update readme ([373701b](https://github.com/thi-ng/umbrella/commit/373701b))
172
+ - add execjs for host calls, update readme ([373701b](https://github.com/thi-ng/umbrella/commit/373701b))
96
173
 
97
- ## [0.7.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.7.8...@thi.ng/pointfree@0.7.9) (2018-05-10)
174
+ ### [0.7.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.7.9) (2018-05-10)
98
175
 
99
- ### Bug Fixes
176
+ #### 🩹 Bug fixes
100
177
 
101
- - **pointfree:** minor update error handling ([5391d98](https://github.com/thi-ng/umbrella/commit/5391d98))
178
+ - minor update error handling ([5391d98](https://github.com/thi-ng/umbrella/commit/5391d98))
102
179
 
103
- # [0.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.6.2...@thi.ng/pointfree@0.7.0) (2018-04-03)
180
+ ### [0.7.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.7.8) (2018-05-10)
104
181
 
105
- ### Features
182
+ #### ♻️ Refactoring
106
183
 
107
- - **pointfree:** add copy() word ([68a8dba](https://github.com/thi-ng/umbrella/commit/68a8dba))
108
- - **pointfree:** add math ops, update load/loadkey, update tests ([2101e92](https://github.com/thi-ng/umbrella/commit/2101e92))
184
+ - update deps & imports in all packages due to [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/main/packages/api) split ([bc45636](https://github.com/thi-ng/umbrella/commit/bc45636))
109
185
 
110
- ## [0.6.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.6.0...@thi.ng/pointfree@0.6.1) (2018-03-31)
186
+ ## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.7.0) (2018-04-03)
111
187
 
112
- ### Bug Fixes
188
+ #### 🚀 Features
113
189
 
114
- - **pointfree:** reexport ensureStack fns ([a0bf781](https://github.com/thi-ng/umbrella/commit/a0bf781))
190
+ - add math ops, update load/loadkey, update tests ([2101e92](https://github.com/thi-ng/umbrella/commit/2101e92))
191
+ - load/loadkey throws error if var doesn't exist
192
+ - add copy() word ([68a8dba](https://github.com/thi-ng/umbrella/commit/68a8dba))
115
193
 
116
- # [0.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.5.0...@thi.ng/pointfree@0.6.0) (2018-03-31)
194
+ #### ♻️ Refactoring
117
195
 
118
- ### Features
196
+ - update/rename storeat => setat, update tests ([92d2d68](https://github.com/thi-ng/umbrella/commit/92d2d68))
197
+ - change behavior to keep obj on stack
119
198
 
120
- - **pointfree:** add caseq() ([5db90c5](https://github.com/thi-ng/umbrella/commit/5db90c5))
199
+ ### [0.6.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.6.1) (2018-03-31)
121
200
 
122
- # [0.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.4.0...@thi.ng/pointfree@0.5.0) (2018-03-29)
201
+ #### 🩹 Bug fixes
123
202
 
124
- ### Features
203
+ - reexport ensureStack fns ([a0bf781](https://github.com/thi-ng/umbrella/commit/a0bf781))
125
204
 
126
- - **pointfree:** add combinators, update controlflow words, remove execq ([3dc30a8](https://github.com/thi-ng/umbrella/commit/3dc30a8))
127
- - **pointfree:** add more dataflow combinators, words & tests ([b096e43](https://github.com/thi-ng/umbrella/commit/b096e43))
205
+ ## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.6.0) (2018-03-31)
128
206
 
129
- # [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.3.0...@thi.ng/pointfree@0.4.0) (2018-03-29)
207
+ #### 🚀 Features
130
208
 
131
- ### Features
209
+ - add caseq() ([5db90c5](https://github.com/thi-ng/umbrella/commit/5db90c5))
132
210
 
133
- - **pointfree:** add new words, constructs, aliases, fix re-exports ([943b4f9](https://github.com/thi-ng/umbrella/commit/943b4f9))
211
+ ## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.5.0) (2018-03-29)
134
212
 
135
- # [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.2.1...@thi.ng/pointfree@0.3.0) (2018-03-28)
213
+ #### 🚀 Features
136
214
 
137
- ### Bug Fixes
215
+ - add more dataflow combinators, words & tests ([b096e43](https://github.com/thi-ng/umbrella/commit/b096e43))
216
+ - add tri/2/3
217
+ - add bis/2, tris/2
218
+ - add bia/2, tria/2
219
+ - add both, either
220
+ - add oneover
221
+ - add combinators, update controlflow words, remove execq ([3dc30a8](https://github.com/thi-ng/umbrella/commit/3dc30a8))
222
+ - add condq(), loopq()
223
+ - update dotimes() to use quotations from stack, no more HOF
224
+ - add dip/2/3/4 combinators
225
+ - add keep/2/3 combinators
226
+ - add bi/2/3 combinators
227
+ - add dup3
228
+ - refactor exec to work w/ quotations, remove execq
229
+ - add/update tests
138
230
 
139
- - **pointfree:** add 0-arity comp() (identity fn) ([10d5a34](https://github.com/thi-ng/umbrella/commit/10d5a34))
140
- - **pointfree:** wordU(), add tests ([1a01f9a](https://github.com/thi-ng/umbrella/commit/1a01f9a))
231
+ ## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.4.0) (2018-03-29)
141
232
 
142
- ### Features
233
+ #### 🚀 Features
143
234
 
144
- - **pointfree:** add new words, rename words, remove mapnth, pushl2 ([0f0c382](https://github.com/thi-ng/umbrella/commit/0f0c382))
145
- - **pointfree:** add rstack, update StackContext ([1c4cd2f](https://github.com/thi-ng/umbrella/commit/1c4cd2f))
146
- - **pointfree:** further restructure, perf, add tests ([3252554](https://github.com/thi-ng/umbrella/commit/3252554))
147
- - **pointfree:** major refactor & restructure ([a48361d](https://github.com/thi-ng/umbrella/commit/a48361d))
148
- - **pointfree:** major update readme, package ([e52b869](https://github.com/thi-ng/umbrella/commit/e52b869))
149
- - **pointfree:** update all words to return stack ([79b4ce3](https://github.com/thi-ng/umbrella/commit/79b4ce3))
150
- - **pointfree:** update word/wordU, add append(), tuple(), join() ([f3f0bec](https://github.com/thi-ng/umbrella/commit/f3f0bec))
235
+ - add new words, constructs, aliases, fix re-exports ([943b4f9](https://github.com/thi-ng/umbrella/commit/943b4f9))
236
+ - add dotimes() loop construct
237
+ - add obj(), bindkeys() object words
238
+ - add rinc/rdec() r-stack words
239
+ - add sin/cos/atan2/rand/log math ops
240
+ - add vec2/3/4 tuple aliases
241
+ - add API types & comp() to re-exports
151
242
 
152
- ## [0.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.2.0...@thi.ng/pointfree@0.2.1) (2018-03-23)
243
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.3.0) (2018-03-28)
153
244
 
154
- ### Bug Fixes
245
+ #### 🚀 Features
155
246
 
156
- - **pointfree:** fix readme/docs ([f211c39](https://github.com/thi-ng/umbrella/commit/f211c39))
247
+ - major update readme, package ([e52b869](https://github.com/thi-ng/umbrella/commit/e52b869))
248
+ - add new words, rename words, remove mapnth, pushl2 ([0f0c382](https://github.com/thi-ng/umbrella/commit/0f0c382))
249
+ - add mapl(), mapll() array transformers
250
+ - refactor foldl() in terms of mapl()
251
+ - add even/odd()
252
+ - rename ladd etc. vadd...
253
+ - revert op2v to produce new result arrays
254
+ - add runE() syntax sugar
255
+ - update tests
256
+ - add rstack, update StackContext ([1c4cd2f](https://github.com/thi-ng/umbrella/commit/1c4cd2f))
257
+ - add 2nd stack (r-stack) to StackContext
258
+ - add supporting rstack words (rdrop/2, mov/cprd, mov/cpdr)
259
+ - add min/max
260
+ - add pushl
261
+ - add cat
262
+ - add printds/rs
263
+ - further restructure, perf, add tests ([3252554](https://github.com/thi-ng/umbrella/commit/3252554))
264
+ - major refactor & restructure ([a48361d](https://github.com/thi-ng/umbrella/commit/a48361d))
265
+ - split out types into api.ts
266
+ - add StackContext and update all word functions to accept and return this type
267
+ - add comp() and update word/wordU() to precompile word
268
+ - add list/array fns: op2l, ladd/lsub/lmul/ldiv, lsplit, foldl
269
+ - update all words to return stack ([79b4ce3](https://github.com/thi-ng/umbrella/commit/79b4ce3))
270
+ - update word/wordU, add append(), tuple(), join() ([f3f0bec](https://github.com/thi-ng/umbrella/commit/f3f0bec))
157
271
 
158
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/pointfree@0.1.0...@thi.ng/pointfree@0.2.0) (2018-03-23)
272
+ #### 🩹 Bug fixes
159
273
 
160
- ### Features
274
+ - add 0-arity comp() (identity fn) ([10d5a34](https://github.com/thi-ng/umbrella/commit/10d5a34))
275
+ - wordU(), add tests ([1a01f9a](https://github.com/thi-ng/umbrella/commit/1a01f9a))
161
276
 
162
- - **pointfree:** add unwrap, quatations, math/bitops, array/obj access ([f75486d](https://github.com/thi-ng/umbrella/commit/f75486d))
163
- - **pointfree:** support data vals in program, add collect(), update readme ([6cac0c7](https://github.com/thi-ng/umbrella/commit/6cac0c7))
277
+ #### ♻️ Refactoring
278
+
279
+ - rename core words & change case ([ba0bcc2](https://github.com/thi-ng/umbrella/commit/ba0bcc2))
280
+ - runU => runu
281
+ - map => maptos
282
+ - mapN => mapnth
283
+ - dropIf/dupIf => dropif/dupif
284
+ - condM => cases
285
+ - bitAnd/Or/Not => bitand/or/not
286
+ - isPos/Neg/Null/Zero => ispos/neg/null/zero
287
+ - execQ => execq
288
+ - storeAt => storeat
289
+ - pushEnv => pushenv
290
+ - loadKey/storeKey => loadkey/storekey
291
+
292
+ ### [0.2.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.2.1) (2018-03-23)
293
+
294
+ #### 🩹 Bug fixes
295
+
296
+ - fix readme/docs ([f211c39](https://github.com/thi-ng/umbrella/commit/f211c39))
297
+
298
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/pointfree@0.2.0) (2018-03-23)
299
+
300
+ #### 🚀 Features
301
+
302
+ - support data vals in program, add collect(), update readme ([6cac0c7](https://github.com/thi-ng/umbrella/commit/6cac0c7))
303
+ - any non-function values in program place themselves on stack
304
+ - update StackProgram type alias
305
+ - add collect() to create stack partitions
306
+ - add unwrap, quatations, math/bitops, array/obj access ([f75486d](https://github.com/thi-ng/umbrella/commit/f75486d))
307
+ - add runU(), wordU() & unwrap()
308
+ - add execQ() for running quotations
309
+ - add more math ops
310
+ - add at(), storeAt()
311
+ - add mapN()
312
+ - various small optimizations / refactorings
313
+ - add dropIf, neg, nop, update cond,condM, add docs/readme ([58f5716](https://github.com/thi-ng/umbrella/commit/58f5716))
314
+ - initial import of refactored [@thi.ng/pointfree](https://github.com/thi-ng/umbrella/tree/main/packages/pointfree) package ([25bbf05](https://github.com/thi-ng/umbrella/commit/25bbf05))
package/README.md CHANGED
@@ -215,7 +215,7 @@ node --experimental-repl-await
215
215
  > const pointfree = await import("@thi.ng/pointfree");
216
216
  ```
217
217
 
218
- Package sizes (gzipped, pre-treeshake): ESM: 3.33 KB
218
+ Package sizes (gzipped, pre-treeshake): ESM: 3.56 KB
219
219
 
220
220
  ## Dependencies
221
221
 
package/bench/index.js ADDED
@@ -0,0 +1,41 @@
1
+ const Benchmark = require('benchmark');
2
+ const pf = require("../index");
3
+
4
+ pf.safeMode(false);
5
+
6
+ const dotp = pf.word([pf.vmul, pf.push(pf.add), 0, pf.foldl]);
7
+ const dotpQ = pf.word([pf.vmul, [pf.add], 0, pf.foldl]);
8
+ const normalize = pf.word([pf.dup, pf.dup, dotp, pf.sqrt, pf.vdiv]);
9
+ const normalizeQ = pf.word([pf.dup, pf.dup, dotpQ, pf.sqrt, pf.vdiv]);
10
+
11
+ function dotpI(a, b) {
12
+ let sum = 0;
13
+ for (let i = 0; i < a.length; i++) {
14
+ sum += a[i] * b[i];
15
+ }
16
+ return sum;
17
+ }
18
+
19
+ function normalizeI(v) {
20
+ const mag = Math.sqrt(dotpI(v, v));
21
+ for (let i = 0; i < v.length; i++) {
22
+ v[i] /= mag;
23
+ }
24
+ return v;
25
+ }
26
+
27
+ let i = 0;
28
+
29
+ new Benchmark.Suite()
30
+ .add("dotp", () => dotp([[[i++, 2, 3], [4, 5, 6]]]))
31
+ .add("dotpQ", () => dotpQ([[[i++, 2, 3], [4, 5, 6]]]))
32
+ .add("dotpI", () => dotpI([i++, 2, 3], [4, 5, 6]))
33
+ .on("cycle", (e) => (i = 0, console.log(String(e.target))))
34
+ .run({ async: false });
35
+
36
+ new Benchmark.Suite()
37
+ .add("normalize", () => normalize([[[10, 10, 0]]]))
38
+ .add("normalizeQ", () => normalizeQ([[[10, 10, 0]]]))
39
+ .add("normalizeI", () => normalizeI([10, 10, 0]))
40
+ .on("cycle", (e) => console.log(String(e.target)))
41
+ .run({ async: false });
package/package.json CHANGED
@@ -1,131 +1,136 @@
1
1
  {
2
- "name": "@thi.ng/pointfree",
3
- "version": "3.0.7",
4
- "description": "Pointfree functional composition / Forth style stack execution engine",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/pointfree#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
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"
35
- },
36
- "dependencies": {
37
- "@thi.ng/api": "^8.1.0",
38
- "@thi.ng/checks": "^3.0.6",
39
- "@thi.ng/compose": "^2.0.7",
40
- "@thi.ng/equiv": "^2.0.6",
41
- "@thi.ng/errors": "^2.0.6"
42
- },
43
- "devDependencies": {
44
- "@thi.ng/testament": "^0.1.6"
45
- },
46
- "keywords": [
47
- "binary",
48
- "composition",
49
- "concatenative",
50
- "dataflow",
51
- "datastructure",
52
- "dsl",
53
- "forth",
54
- "functional",
55
- "pipeline",
56
- "pointfree",
57
- "stack",
58
- "transformation",
59
- "typescript"
60
- ],
61
- "publishConfig": {
62
- "access": "public"
63
- },
64
- "engines": {
65
- "node": ">=12.7"
66
- },
67
- "files": [
68
- "*.js",
69
- "*.d.ts"
70
- ],
71
- "exports": {
72
- ".": {
73
- "import": "./index.js"
74
- },
75
- "./api": {
76
- "import": "./api.js"
77
- },
78
- "./array": {
79
- "import": "./array.js"
80
- },
81
- "./binary": {
82
- "import": "./binary.js"
83
- },
84
- "./cond": {
85
- "import": "./cond.js"
86
- },
87
- "./context": {
88
- "import": "./context.js"
89
- },
90
- "./dataflow": {
91
- "import": "./dataflow.js"
92
- },
93
- "./env": {
94
- "import": "./env.js"
95
- },
96
- "./io": {
97
- "import": "./io.js"
98
- },
99
- "./logic": {
100
- "import": "./logic.js"
101
- },
102
- "./loop": {
103
- "import": "./loop.js"
104
- },
105
- "./math": {
106
- "import": "./math.js"
107
- },
108
- "./ops": {
109
- "import": "./ops.js"
110
- },
111
- "./run": {
112
- "import": "./run.js"
113
- },
114
- "./safe": {
115
- "import": "./safe.js"
116
- },
117
- "./stack": {
118
- "import": "./stack.js"
119
- },
120
- "./string": {
121
- "import": "./string.js"
122
- },
123
- "./word": {
124
- "import": "./word.js"
125
- }
126
- },
127
- "thi.ng": {
128
- "year": 2015
129
- },
130
- "gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
131
- }
2
+ "name": "@thi.ng/pointfree",
3
+ "version": "3.1.2",
4
+ "description": "Pointfree functional composition / Forth style stack execution engine",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/pointfree#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/api": "^8.3.2",
38
+ "@thi.ng/checks": "^3.1.2",
39
+ "@thi.ng/compose": "^2.1.2",
40
+ "@thi.ng/equiv": "^2.1.2",
41
+ "@thi.ng/errors": "^2.1.2"
42
+ },
43
+ "devDependencies": {
44
+ "@microsoft/api-extractor": "^7.18.19",
45
+ "@thi.ng/testament": "^0.2.2",
46
+ "rimraf": "^3.0.2",
47
+ "tools": "^0.0.1",
48
+ "typedoc": "^0.22.9",
49
+ "typescript": "^4.5.2"
50
+ },
51
+ "keywords": [
52
+ "binary",
53
+ "composition",
54
+ "concatenative",
55
+ "dataflow",
56
+ "datastructure",
57
+ "dsl",
58
+ "forth",
59
+ "functional",
60
+ "pipeline",
61
+ "pointfree",
62
+ "stack",
63
+ "transformation",
64
+ "typescript"
65
+ ],
66
+ "publishConfig": {
67
+ "access": "public"
68
+ },
69
+ "engines": {
70
+ "node": ">=12.7"
71
+ },
72
+ "files": [
73
+ "*.js",
74
+ "*.d.ts"
75
+ ],
76
+ "exports": {
77
+ ".": {
78
+ "import": "./index.js"
79
+ },
80
+ "./api": {
81
+ "import": "./api.js"
82
+ },
83
+ "./array": {
84
+ "import": "./array.js"
85
+ },
86
+ "./binary": {
87
+ "import": "./binary.js"
88
+ },
89
+ "./cond": {
90
+ "import": "./cond.js"
91
+ },
92
+ "./context": {
93
+ "import": "./context.js"
94
+ },
95
+ "./dataflow": {
96
+ "import": "./dataflow.js"
97
+ },
98
+ "./env": {
99
+ "import": "./env.js"
100
+ },
101
+ "./io": {
102
+ "import": "./io.js"
103
+ },
104
+ "./logic": {
105
+ "import": "./logic.js"
106
+ },
107
+ "./loop": {
108
+ "import": "./loop.js"
109
+ },
110
+ "./math": {
111
+ "import": "./math.js"
112
+ },
113
+ "./ops": {
114
+ "import": "./ops.js"
115
+ },
116
+ "./run": {
117
+ "import": "./run.js"
118
+ },
119
+ "./safe": {
120
+ "import": "./safe.js"
121
+ },
122
+ "./stack": {
123
+ "import": "./stack.js"
124
+ },
125
+ "./string": {
126
+ "import": "./string.js"
127
+ },
128
+ "./word": {
129
+ "import": "./word.js"
130
+ }
131
+ },
132
+ "thi.ng": {
133
+ "year": 2015
134
+ },
135
+ "gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
136
+ }