Skip to content

sortable

Michael Rojas edited this page Jun 24, 2021 · 1 revision

dastal - v5.0.0 / Sortable

Interface: Sortable<T>

Represents an object containing a set of elements that can be sorted.

Type parameters

Name
T

Hierarchy

Table of contents

Methods

Methods

sort

sort(compareFn): Sortable<T>

Sorts the elements in place.

Parameters

Name Type Description
compareFn CompareFn<T> A function used to determine the order of elements. It is expected to return: - A negative value if first argument < second argument - Zero if first argument == second argument - A positive value if first argument > second argument

Returns

Sortable<T>

The object this method was called on

Defined in

src/index.ts:52

Clone this wiki locally