Skip to content

Commit 06e7c38

Browse files
committed
Update README
1 parent 440409f commit 06e7c38

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,24 @@ To get the copy of the instance, use `clone()`, or alternatively the copy constr
101101

102102
- `new MultiRange(data?: Initializer)` Creates a new MultiRange object.
103103
- `clone(): MultiRange` Clones this instance.
104-
- `append(value: Initializer): MultiRange` Appends to this instance.
105-
- `subtract(value: Initializer): MultiRange` Subtracts from this instance.
104+
- `append(value: Initializer): MultiRange` Appends `value` to this instance.
105+
- `subtract(value: Initializer): MultiRange` Subtracts `value` from this instance.
106106
- `intersect(value: Initializer): MultiRange` Remove integers which are not included in `value` (aka intersection).
107-
- `has(value: Initializer): boolean` Checks if the instance contains the specified value.
108-
- `length(): number` Calculates how many numbers are effectively included in this instance. (ie, 5 for '3,5-7,9')
107+
- `has(value: Initializer): boolean` Checks if the instance contains `value`.
108+
- `length(): number` Calculates how many numbers are effectively included in this instance (ie, 5 for '3,5-7,9'). Returns Inifnity for an unbounded range.
109109
- `segmentLength(): number` Returns the number of range segments (ie, 3 for '3,5-7,9' and 0 for an empty range)
110110
- `equals(cmp: Initializer): boolean` Checks if two MultiRange data are identical.
111111
- `isUnbounded(): boolean` Returns if the instance is unbounded.
112+
- `min(): number | undefined` Returns the minimum integer. May return -Infinity.
113+
- `max(): number | undefined` Returns the maxinum integer. May return Infinity.
114+
- `shift(): number | undefined` Removes the minimum integer and returns it.
115+
- `pop(): number | undefined` Removes the maxinum integer and returns it.
112116
- `toString(): string` Returns the string respresentation of this MultiRange.
113117
- `getRanges(): [number, number][]` Exports the whole range data as an array of [number, number] arrays.
114118
- `toArray(): number[]` Builds an array of integer which holds all integers in this MultiRange. Note that this may be slow and memory-consuming for large ranges such as '1-10000'.
115119
- `getIterator(): Object` Returns ES6-compatible iterator. See the description below.
116120

117-
The following methods are deprecated and may be removed in future releases:
121+
The following methods were removed:
118122

119123
- `appendRange(min: number, max: number): MultiRange` Use `append([[min, max]])` instead.
120124
- `subtractRange(min: number, max: number): MultiRange` Use `subtract([[min, max]])` instead.
@@ -217,6 +221,10 @@ declare module "multi-integer-range" {
217221
}
218222
```
219223

224+
## Changelog
225+
226+
See [the relase page on GitHub](https://github.com/smikitky/node-multi-integer-range/releases).
227+
220228
## Development
221229

222230
### Building and Testing

0 commit comments

Comments
 (0)