patroon 1.4.0 → 1.4.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
@@ -4,8 +4,21 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v1.4.2](https://github.com/bas080/patroon/compare/v1.4.1...v1.4.2)
8
+
9
+ - Remove git add for mz files in version script [`a1b244c`](https://github.com/bas080/patroon/commit/a1b244c4ef7c7097cba3e48159d6521fd78bfa25)
10
+
11
+ #### [v1.4.1](https://github.com/bas080/patroon/compare/v1.4.0...v1.4.1)
12
+
13
+ > 26 October 2022
14
+
15
+ - Add test for checking some function values [`c19ca9b`](https://github.com/bas080/patroon/commit/c19ca9be1e5957564314f7cafa5b6a59629394a0)
16
+ - Do not fail silently when formatting not in order [`6fba5f8`](https://github.com/bas080/patroon/commit/6fba5f88f7c394633ff7fdcafdbf4dc86720d2eb)
17
+
7
18
  #### [v1.4.0](https://github.com/bas080/patroon/compare/v1.3.0...v1.4.0)
8
19
 
20
+ > 6 October 2022
21
+
9
22
  - Add the matches pattern helper [`249eba6`](https://github.com/bas080/patroon/commit/249eba61481ce1a8899a3474c5055e85d441b783)
10
23
 
11
24
  #### [v1.3.0](https://github.com/bas080/patroon/compare/v1.2.6...v1.3.0)
@@ -199,8 +212,14 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
199
212
 
200
213
  - Fix spelling mistakes [`1bd9975`](https://github.com/bas080/patroon/commit/1bd9975a02d97603ccbda0c96f8da5968beabb09)
201
214
 
202
- #### v0.0.1
215
+ #### [v0.0.1](https://github.com/bas080/patroon/compare/v0.0.0...v0.0.1)
203
216
 
204
217
  > 1 October 2021
205
218
 
206
219
  - Initiate project [`0da801e`](https://github.com/bas080/patroon/commit/0da801e15901036022bc3af4ef2232c98e7cf851)
220
+
221
+ #### v0.0.0
222
+
223
+ > 1 October 2021
224
+
225
+ - Initiate project [`fe55348`](https://github.com/bas080/patroon/commit/fe55348033f102c489a2a86f8e11708334007299)
package/CONTRIBUTING.md CHANGED
@@ -16,7 +16,7 @@
16
16
  Standard is good enough.
17
17
 
18
18
  ```bash bash 1>&2
19
- npx standard || npx standard --fix
19
+ npx standard
20
20
  ```
21
21
 
22
22
  ## Documentation
@@ -42,11 +42,11 @@ npm link patroon
42
42
  ```
43
43
  ```
44
44
 
45
- up to date, audited 3 packages in 910ms
45
+ added 1 package, and audited 3 packages in 898ms
46
46
 
47
47
  found 0 vulnerabilities
48
48
 
49
- added 1 package, and audited 79 packages in 906ms
49
+ added 1 package, and audited 79 packages in 995ms
50
50
 
51
51
  52 packages are looking for funding
52
52
  run `npm fund` for details
package/CONTRIBUTING.mz CHANGED
@@ -16,7 +16,7 @@
16
16
  Standard is good enough.
17
17
 
18
18
  ```bash bash 1>&2
19
- npx standard || npx standard --fix
19
+ npx standard
20
20
  ```
21
21
 
22
22
  ## Documentation
package/README.md CHANGED
@@ -635,7 +635,7 @@ npx nyc npm t | npx tap-nyc
635
635
  npx nyc check-coverage
636
636
  ```
637
637
  ```
638
- > patroon@1.4.0 test
638
+ > patroon@1.4.2 test
639
639
  > tape ./src/index.test.js
640
640
  -------------|---------|----------|---------|---------|-------------------
641
641
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
@@ -649,7 +649,7 @@ npx nyc check-coverage
649
649
  total: 31
650
650
  passing: 31
651
651
 
652
- duration: 10.7s
652
+ duration: 8.9s
653
653
 
654
654
  ```
655
655
 
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "patroon",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Pattern matching library",
5
5
  "repository": "github:bas080/patroon",
6
6
  "main": "./src/index.js",
7
7
  "scripts": {
8
8
  "test": "tape ./src/index.test.js",
9
- "version": "markatzea CONTRIBUTING.mz | tee CONTRIBUTING.md && git add *.mz *.md"
9
+ "version": "markatzea CONTRIBUTING.mz | tee CONTRIBUTING.md && git add *.md"
10
10
  },
11
11
  "keywords": [
12
12
  "array",
package/src/index.test.js CHANGED
@@ -95,6 +95,26 @@ test('Throws in a predicate function', t => {
95
95
  )
96
96
  })
97
97
 
98
+ function wrappedInFunctions (value, times) {
99
+ if (times >= 0) { return wrappedInFunctions(() => value, times - 1) }
100
+
101
+ return () => value
102
+ }
103
+
104
+ test('Functions', check(gen.any, gen.int, (t, a, times) => {
105
+ const value = wrappedInFunctions(a, times)
106
+
107
+ patroon(value, a, _, _)(a)
108
+ patroon(value, value, _, _)(a)
109
+ patroon(a, value, _, _)(a)
110
+
111
+ patroon(value, a, _, _)(value)
112
+ patroon(value, value, _, _)(value)
113
+ patroon(a, value, _, _)(value)
114
+
115
+ t.end()
116
+ }))
117
+
98
118
  test('Throws when an uneven amount of arguments are passed', t => {
99
119
  t.plan(1)
100
120
  t.throws(() => patroon(1), UnevenArgumentCountError)