Creates a new
Specifies an additional node or list of nodes to be topologically sorted where:
nodes- a mixed value or array of mixed values to be added as nodes to the topologically sorted list.
options- optional sorting information about the
group- a string naming the group to which
nodesshould be assigned. The group name
before- a string or array of strings specifying the groups that
nodesmust precede in the topological sort.
after- a string or array of strings specifying the groups that
nodesmust succeed in the topological sort.
sort- a numerical value used to sort items when performing a
Returns an array of the topologically sorted nodes.
An array of the topologically sorted nodes. This list is renewed upon each call to
Sorter object into the current object where:
others- the other object or array of objects to be merged into the current one.
nullvalues are ignored.
Returns an array of the topologically sorted nodes. Will throw if a dependency error is found as a result of the combined items.
If the order in which items have been added to each list matters, use the
sort option in
sorter.add() with an incrementing
value providing an absolute sort order among all items added to either object.