Skip to content

LinusU/node-immutable-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Immutable Sort

Immutable sort function for javascript.

Installation

npm install --save immutable-sort

Usage

const sort = require('immutable-sort')
const array = [1, 5, 2, 4, 3]

const sortedArray = sort(array)

// [1, 5, 2, 4, 3]
console.log(array)

// [1, 2, 3, 4, 5]
console.log(sortedArray)

API

sort<T>(array: T[], compare?: Function) -> T[]

Sorts the array array, optionally with the provided compare function compare and returns a new sorted array. The input is not modified in any way.

About

Immutable sort function for javascript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published