You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: meta/generated-docs/README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
<!-- meta/generated-docs/README.md is generated from meta/scripts/lib/generated-doc-index.md. Do not make edits to meta/generated-docs/README.md; instead, make them to meta/scripts/lib/generated-doc-index.md and then re-run the build. -->
2
+
1
3
# YavaScript API Documentation Index
2
4
3
5
Here is a list of all of YavaScript's builtin APIs, aside from those normally found in ECMAScript.
@@ -46,6 +48,7 @@ Here is a list of all of YavaScript's builtin APIs, aside from those normally fo
46
48
-[`which`]: Find the path to a program on the system
47
49
-[`grepFile`]: Search for matches in a file
48
50
-[`grepString`]: Search for matches in a string
51
+
-[`grepArray`]: Search for matches in an Array
49
52
-[`whoami`]: Get user name/uid/gid
50
53
-[`openUrl`]: Open a file/url using your operating system's default application for that file/url
51
54
@@ -201,6 +204,7 @@ For convenience, two of the builtin modules from QuickJS are also available as g
@@ -25,7 +34,8 @@ the specified pattern, as an array of strings or detail objects.
25
34
-`@param`_pattern_ — The pattern to find. Can be a string or a RegExp.
26
35
-`@param`_options_ — Options which control matching behavior.
27
36
28
-
See also [grepFile](/meta/generated-docs/grep.md#grepfile-function) and [String.prototype.grep](/meta/generated-docs/grep.md#stringgrep-function-property).
37
+
See also [grepFile](/meta/generated-docs/grep.md#grepfile-function), [grepArray](/meta/generated-docs/grep.md#greparray-function), [String.prototype.grep](/meta/generated-docs/grep.md#stringgrep-function-property),
38
+
and [Array.prototype.grep](/meta/generated-docs/grep.md#arraygrep-function-property).
Returns those Array items matching the specified pattern, as either an
70
+
Array of items or an Array of detail objects.
71
+
72
+
- `@param` _targetArray_ — The Array of strings to search through. Non-strings will be coerced to string during matching.
73
+
- `@param` _pattern_ — The pattern to find. Can be a string or a RegExp.
74
+
- `@param` _options_ — Options which control matching behavior.
75
+
76
+
See also [grepString](/meta/generated-docs/grep.md#grepstring-function), [grepFile](/meta/generated-docs/grep.md#grepfile-function), [String.prototype.grep](/meta/generated-docs/grep.md#stringgrep-function-property),
77
+
and [Array.prototype.grep](/meta/generated-docs/grep.md#arraygrep-function-property).
Reads the file content at `path`, splits it on `\n`, and then returns the
60
-
lines matching the specified pattern, as an array of strings or detail objects.
113
+
lines matching the specified pattern, as an array of strings or detail
114
+
objects.
61
115
62
116
- `@param` _str_ — The string to search through.
63
117
- `@param` _pattern_ — The pattern to find. Can be a string or a RegExp.
64
118
- `@param` _options_ — Options which control matching behavior.
65
119
66
-
See also [grepString](/meta/generated-docs/grep.md#grepstring-function) and [String.prototype.grep](/meta/generated-docs/grep.md#stringgrep-function-property).
120
+
See also [grepArray](/meta/generated-docs/grep.md#greparray-function), [grepString](/meta/generated-docs/grep.md#grepstring-function),
121
+
[String.prototype.grep](/meta/generated-docs/grep.md#stringgrep-function-property), and [Array.prototype.grep](/meta/generated-docs/grep.md#arraygrep-function-property).
67
122
68
123
```ts
69
124
const grepFile: {
@@ -121,7 +176,8 @@ specified pattern, as an array of strings or detail objects.
121
176
-`@param`_pattern_ — The pattern to find. Can be a string or a RegExp.
122
177
-`@param`_options_ — Options which control matching behavior.
123
178
124
-
See also [grepString](/meta/generated-docs/grep.md#grepstring-function) and [grepFile](/meta/generated-docs/grep.md#grepfile-function).
179
+
See also [grepString](/meta/generated-docs/grep.md#grepstring-function), [grepArray](/meta/generated-docs/grep.md#greparray-function), [grepFile](/meta/generated-docs/grep.md#grepfile-function), and
Returns those Array items matching the specified pattern, as either an
224
+
Array of items or an Array of detail objects.
225
+
226
+
- `@param` _pattern_ — The pattern to find. Can be a string or a RegExp.
227
+
- `@param` _options_ — Options which control matching behavior.
228
+
229
+
See also [grepString](/meta/generated-docs/grep.md#grepstring-function), [grepArray](/meta/generated-docs/grep.md#greparray-function), [grepFile](/meta/generated-docs/grep.md#grepfile-function), and
Copy file name to clipboardExpand all lines: meta/scripts/lib/generated-doc-index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
<!-- meta/generated-docs/README.md is generated from meta/scripts/lib/generated-doc-index.md. Do not make edits to meta/generated-docs/README.md; instead, make them to meta/scripts/lib/generated-doc-index.md and then re-run the build. -->
2
+
1
3
# YavaScript API Documentation Index
2
4
3
5
Here is a list of all of YavaScript's builtin APIs, aside from those normally found in ECMAScript.
@@ -46,6 +48,7 @@ Here is a list of all of YavaScript's builtin APIs, aside from those normally fo
46
48
-[`which`]: Find the path to a program on the system
47
49
-[`grepFile`]: Search for matches in a file
48
50
-[`grepString`]: Search for matches in a string
51
+
-[`grepArray`]: Search for matches in an Array
49
52
-[`whoami`]: Get user name/uid/gid
50
53
-[`openUrl`]: Open a file/url using your operating system's default application for that file/url
0 commit comments