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: dist/index.cjs
+47-77Lines changed: 47 additions & 77 deletions
Original file line number
Diff line number
Diff line change
@@ -14,51 +14,18 @@ var arrayBack = require('array-back');
14
14
* arr {string[]} - Input array. Only mutated if `options.remove` is set.
15
15
* [options.rtol] {boolean} - Enable right-to-left scans. Either that or pass in a custom iterator. TODO.
16
16
* [options.remove] {boolean} - Remove from source array
17
-
* [options.inclusive] {boolean} - If `true` includes the to item.
18
-
* [options.from] {string[]|function[]}
19
-
* [options.to] {string[]|function[]} - A "Stop Here" function. Set one or more strings as the terminating arg. Or, from the function `fn(arg, index, argv, valueIndex)`, return true for the first arg that is out of range. Set `inclusive` to also include it.
20
-
* [options.toInclude] {string[]|function[]} - From the function `fn(arg, index, argv, valueIndex)`, return true for the first arg that is out of range. Set `inclusive` to also include it.
21
-
* [options.noFurtherThan] {function}
22
-
* [options.toEnd] {boolean}
17
+
* [options.from] {string[]|function[]} - String literal or a [findIndex](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) callback function.
18
+
* [options.to] {string[]|function[]} - A "Stop Here" function. Set one or more strings as the terminating arg. Or, from the function `fn(arg, index, argv, valueIndex)`, return true for the first arg that is out of range. Set `inclusive` to also include it. To will always search to the end of the input array.
Copy file name to clipboardExpand all lines: lib/option-definition.js
+1-6Lines changed: 1 addition & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,8 @@ class OptionDefinition {
2
2
name
3
3
from
4
4
to
5
-
6
-
/**
7
-
* An additional alternative, or replacement, for `to`. Might result in easier code, e.g. "no further than a --option", rather than "stop here if the next item is an option or the end". This is also how slice() works: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice
0 commit comments