1.1.0 • Published 5 years ago

sort-insertion v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

sort-insertion

Insertion sort for arrays.

Returns a sorted array, original array stays untouched.

example

import sort from 'sort-insertion'

sort([6, 2, 5, 3], function (a, b) {
	return a > b
}) // returns [2, 3, 5, 6]

sort(['hello', 'how', 'are', 'you', '?'], function (a, b) {
	return a.length > b.length
}) // returns ['?', 'how', 'are', 'you', 'hello']
1.1.0

5 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago