The number of entries in the sorted list.
The number of items in the list.
Constructs a binary sorted list which is initially empty or populated with initial values.
Constructs a binary sorted list which is initially populated with the provided values.
Returns a new iterator object that yields the list values.
An iterable iterator for the list values, same as values().
Insert a value in order (before duplicates if they exist).
The value to insert into the list.
The instance of the SortedList with the new value added.
Get the value at the specified index.
The index of the value to retrieve.
The value at the given index or undefined if the index is out of bounds.
Remove all entries from the list.
Static ReadonlydefaultRemove the value (only the first occurrence if duplicates exist).
The value to remove.
True if the value was removed, otherwise false.
Remove the entry at the specified index.
The index of the value to remove.
The removed value or undefined if the index is out of bounds.
Call the callback function once for each entry in the list.
The callback function to call on each entry.
Check if the value exists in the list.
The value to search for.
True if the value exists, otherwise false.
Search for the entry that matches the value, or the next greater entry if no exact match is found.
The value to search for.
An array where the first element is the index, and the second element is a boolean indicating if an exact match was found.
Get a slice of the list as a new sorted list, selected from start to end.
Optionalstart: numberThe starting index (inclusive).
Optionalend: numberThe ending index (exclusive).
A new SortedList containing the sliced portion of the list.
Returns a new iterator object that yields the list values.
An iterable iterator for the list values.
A binary sorted list. This list keeps items sorted according to a custom compare function or the default comparison (based on string value).