@thi.ng/pointfree 3.1.7 → 3.1.10

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,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-06-09T16:14:01Z
3
+ - **Last updated**: 2022-08-01T14:54:00Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/bench/index.js CHANGED
@@ -1,4 +1,4 @@
1
- const Benchmark = require('benchmark');
1
+ const Benchmark = require("benchmark");
2
2
  const pf = require("../index");
3
3
 
4
4
  pf.safeMode(false);
@@ -9,33 +9,47 @@ const normalize = pf.word([pf.dup, pf.dup, dotp, pf.sqrt, pf.vdiv]);
9
9
  const normalizeQ = pf.word([pf.dup, pf.dup, dotpQ, pf.sqrt, pf.vdiv]);
10
10
 
11
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;
12
+ let sum = 0;
13
+ for (let i = 0; i < a.length; i++) {
14
+ sum += a[i] * b[i];
15
+ }
16
+ return sum;
17
17
  }
18
18
 
19
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;
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
25
  }
26
26
 
27
27
  let i = 0;
28
28
 
29
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 });
30
+ .add("dotp", () =>
31
+ dotp([
32
+ [
33
+ [i++, 2, 3],
34
+ [4, 5, 6],
35
+ ],
36
+ ])
37
+ )
38
+ .add("dotpQ", () =>
39
+ dotpQ([
40
+ [
41
+ [i++, 2, 3],
42
+ [4, 5, 6],
43
+ ],
44
+ ])
45
+ )
46
+ .add("dotpI", () => dotpI([i++, 2, 3], [4, 5, 6]))
47
+ .on("cycle", (e) => ((i = 0), console.log(String(e.target))))
48
+ .run({ async: false });
35
49
 
36
50
  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 });
51
+ .add("normalize", () => normalize([[[10, 10, 0]]]))
52
+ .add("normalizeQ", () => normalizeQ([[[10, 10, 0]]]))
53
+ .add("normalizeI", () => normalizeI([10, 10, 0]))
54
+ .on("cycle", (e) => console.log(String(e.target)))
55
+ .run({ async: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/pointfree",
3
- "version": "3.1.7",
3
+ "version": "3.1.10",
4
4
  "description": "Pointfree functional composition / Forth style stack execution engine",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,19 +34,19 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.3.7",
38
- "@thi.ng/checks": "^3.2.0",
39
- "@thi.ng/compose": "^2.1.7",
40
- "@thi.ng/equiv": "^2.1.7",
41
- "@thi.ng/errors": "^2.1.7"
37
+ "@thi.ng/api": "^8.3.9",
38
+ "@thi.ng/checks": "^3.2.3",
39
+ "@thi.ng/compose": "^2.1.9",
40
+ "@thi.ng/equiv": "^2.1.9",
41
+ "@thi.ng/errors": "^2.1.9"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@microsoft/api-extractor": "^7.25.0",
45
- "@thi.ng/testament": "^0.2.8",
45
+ "@thi.ng/testament": "^0.2.10",
46
46
  "rimraf": "^3.0.2",
47
47
  "tools": "^0.0.1",
48
48
  "typedoc": "^0.22.17",
49
- "typescript": "^4.7.3"
49
+ "typescript": "^4.7.4"
50
50
  },
51
51
  "keywords": [
52
52
  "binary",
@@ -132,5 +132,5 @@
132
132
  "thi.ng": {
133
133
  "year": 2015
134
134
  },
135
- "gitHead": "9e516d30a1a537e027a6b3d78bf9121bc5831d31\n"
135
+ "gitHead": "976ccd698cedaa60dcef2e69030a5eb98898cc4a\n"
136
136
  }