@thi.ng/parse 2.6.26 → 2.6.28
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 +1 -1
- package/README.md +1 -1
- package/package.json +9 -9
- package/prims/satisfy.js +4 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/parse",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.28",
|
|
4
4
|
"description": "Purely functional parser combinators & AST generation for generic inputs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.12.
|
|
43
|
-
"@thi.ng/checks": "^3.7.
|
|
44
|
-
"@thi.ng/defmulti": "^3.0.
|
|
45
|
-
"@thi.ng/errors": "^2.5.
|
|
46
|
-
"@thi.ng/strings": "^3.9.
|
|
42
|
+
"@thi.ng/api": "^8.12.2",
|
|
43
|
+
"@thi.ng/checks": "^3.7.18",
|
|
44
|
+
"@thi.ng/defmulti": "^3.0.76",
|
|
45
|
+
"@thi.ng/errors": "^2.5.42",
|
|
46
|
+
"@thi.ng/strings": "^3.9.22"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"esbuild": "^0.25.
|
|
50
|
-
"typedoc": "^0.28.
|
|
49
|
+
"esbuild": "^0.25.9",
|
|
50
|
+
"typedoc": "^0.28.12",
|
|
51
51
|
"typescript": "^5.9.2"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [
|
|
@@ -246,5 +246,5 @@
|
|
|
246
246
|
],
|
|
247
247
|
"year": 2020
|
|
248
248
|
},
|
|
249
|
-
"gitHead": "
|
|
249
|
+
"gitHead": "b7ede4f099767e0175ea8e09257208f73970b220\n"
|
|
250
250
|
}
|
package/prims/satisfy.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const satisfy = (pred, id = "satisfy") => (ctx) => {
|
|
1
|
+
const satisfy = (pred, id = "satisfy") => ((ctx) => {
|
|
2
2
|
if (ctx.done) return false;
|
|
3
3
|
const r = ctx.reader.read(ctx.state);
|
|
4
4
|
return pred(r) ? ctx.addChild(id, r, true) : false;
|
|
5
|
-
};
|
|
6
|
-
const satisfyD = (pred) => (ctx) => {
|
|
5
|
+
});
|
|
6
|
+
const satisfyD = (pred) => ((ctx) => {
|
|
7
7
|
if (ctx.done) return false;
|
|
8
8
|
const { reader, state } = ctx;
|
|
9
9
|
return pred(reader.read(state)) ? (reader.next(state), true) : false;
|
|
10
|
-
};
|
|
10
|
+
});
|
|
11
11
|
export {
|
|
12
12
|
satisfy,
|
|
13
13
|
satisfyD
|