summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritchyny <itchyny@cybozu.co.jp>2023-07-09 15:42:23 +0900
committerNico Williams <nico@cryptonector.com>2023-07-09 10:54:13 -0500
commitcac216a39c120166b247b5dc8f0ded56b4bb3281 (patch)
treefc4891d7270e73ddf00cd56d6690e184f46ad2a0
parentab1a68144dc8355059473c977a0e4edf2fe7f2b8 (diff)
Fix manual on paths/1 to use boolean filter for its argument
-rw-r--r--docs/content/manual/manual.yml6
-rw-r--r--docs/content/manual/v1.5/manual.yml6
-rw-r--r--docs/content/manual/v1.6/manual.yml6
-rw-r--r--tests/man.test2
4 files changed, 10 insertions, 10 deletions
diff --git a/docs/content/manual/manual.yml b/docs/content/manual/manual.yml
index 183e4a5d..ed9a8c3a 100644
--- a/docs/content/manual/manual.yml
+++ b/docs/content/manual/manual.yml
@@ -1148,15 +1148,15 @@ sections:
(except it does not output the empty list, representing .
itself).
- `paths(f)` outputs the paths to any values for which `f` is true.
- That is, `paths(numbers)` outputs the paths to all numeric
+ `paths(f)` outputs the paths to any values for which `f` is `true`.
+ That is, `paths(type == "number")` outputs the paths to all numeric
values.
examples:
- program: '[paths]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']
- - program: '[paths(scalars)]'
+ - program: '[paths(type == "number")]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1,1,"a"]]']
diff --git a/docs/content/manual/v1.5/manual.yml b/docs/content/manual/v1.5/manual.yml
index 5dc05fc1..2274bc87 100644
--- a/docs/content/manual/v1.5/manual.yml
+++ b/docs/content/manual/v1.5/manual.yml
@@ -891,8 +891,8 @@ sections:
(except it does not output the empty list, representing .
itself).
- `paths(f)` outputs the paths to any values for which `f` is true.
- That is, `paths(numbers)` outputs the paths to all numeric
+ `paths(f)` outputs the paths to any values for which `f` is `true`.
+ That is, `paths(type == "number")` outputs the paths to all numeric
values.
`leaf_paths` is an alias of `paths(scalars)`; `leaf_paths` is
@@ -902,7 +902,7 @@ sections:
- program: '[paths]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']
- - program: '[paths(scalars)]'
+ - program: '[paths(type == "number")]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1,1,"a"]]']
diff --git a/docs/content/manual/v1.6/manual.yml b/docs/content/manual/v1.6/manual.yml
index e4926c08..e4b7e229 100644
--- a/docs/content/manual/v1.6/manual.yml
+++ b/docs/content/manual/v1.6/manual.yml
@@ -1052,8 +1052,8 @@ sections:
(except it does not output the empty list, representing .
itself).
- `paths(f)` outputs the paths to any values for which `f` is true.
- That is, `paths(numbers)` outputs the paths to all numeric
+ `paths(f)` outputs the paths to any values for which `f` is `true`.
+ That is, `paths(type == "number")` outputs the paths to all numeric
values.
`leaf_paths` is an alias of `paths(scalars)`; `leaf_paths` is
@@ -1063,7 +1063,7 @@ sections:
- program: '[paths]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1],[1,0],[1,1],[1,1,"a"]]']
- - program: '[paths(scalars)]'
+ - program: '[paths(type == "number")]'
input: '[1,[[],{"a":2}]]'
output: ['[[0],[1,1,"a"]]']
diff --git a/tests/man.test b/tests/man.test
index 833837f3..0ec20c62 100644
--- a/tests/man.test
+++ b/tests/man.test
@@ -308,7 +308,7 @@ null
[1,[[],{"a":2}]]
[[0],[1],[1,0],[1,1],[1,1,"a"]]
-[paths(scalars)]
+[paths(type == "number")]
[1,[[],{"a":2}]]
[[0],[1,1,"a"]]