class type t =Inheritsobject
..end
method findInsertionIndex : 'a 'b. 'a Js.t -> 'b Js.callback Js.optdef -> Js.number Js.t Js.meth
Calculates the insertion index of the new item based upon the comparison function passed, or the current sort order.
Parameters:
_ Js.t
The new object to find the insertion position of.
_ Js.callback
(optional)
The function to sort by. This is the same as the sorting function passed to sortBy. It accepts 2 items from this MixedCollection, and returns -1 0, or 1 depending on the relative sort positions of the 2 compared items.
If omitted, a function generated from the currently defined set of sorters will be used.
Returns:
Js.number Js.t
The insertion point to add the new item into this MixedCollection at using insert
method reorder : 'c. 'c Js.t -> unit Js.meth
Reorders each of the items based on a mapping from old index to new index. Internally this just translates into a sort. The 'sort' event is fired whenever reordering has occured.
Parameters:
_ Js.t
Mapping from old item index to new item index
method sortBy : 'd. 'd Js.callback -> unit Js.meth
Sorts the collection by a single sorter function
Parameters:
_ Js.callback
The function to sort by
method sortByKey : 'e. Js.js_string Js.t Js.optdef -> 'e Js.callback Js.optdef -> unit Js.meth
Sorts this collection by keys.
Parameters:
Js.js_string Js.t
(optional)
'ASC' or 'DESC'. Defaults to 'ASC'.
_ Js.callback
(optional)
Comparison function that defines the sort order. Defaults to sorting by case insensitive string.