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
Some methods and the constructor take one *Initializer* parameter.
55
55
An initializer is one of the followings:
56
56
57
-
- a valid string (eg`'1-3,5'`)
58
-
- an array of integers (eg`[1, 2, 3, 5]`)
59
-
- an array of `[number, number]` tuples (eg`[[1, 3], [5, 5]]`)
60
-
- mixture of integers and tuples (eg`[[1, 3], 5]`)
61
-
- a single integer (eg`1`)
57
+
- a valid string (e.g.,`'1-3,5'`)
58
+
- an array of integers (e.g.,`[1, 2, 3, 5]`)
59
+
- an array of `[min, max]` tuples (e.g.,`[[1, 3], [5, 5]]`)
60
+
- mixture of integers and tuples (e.g.,`[[1, 3], 5]`)
61
+
- a single integer (e.g.,`1`)
62
62
- another MultiRange instance
63
63
64
64
Pass it to the constructor to create a MultiRange object,
@@ -126,12 +126,12 @@ To get a copy of the instance, use `clone()`, or alternatively the copy construc
126
126
-`toString(): string` Returns the string respresentation of this MultiRange.
127
127
-`getRanges(): [number, number][]` Exports the whole range data as an array of [number, number] tuples.
128
128
-`toArray(): number[]` Builds an array of integer which holds all integers in this MultiRange. This may be slow and memory-consuming for large ranges such as '1-10000'.
129
-
-`getIterator(): Object` Returns ES6-compatible iterator. See the description below.
129
+
-`getIterator(): Object` Returns an ES6-compatible iterator. See the description below.
130
130
131
131
Available `options` that can be passed to the constructor:
0 commit comments