npm.io
0.0.7 • Published 8 years ago

sort-x

Licence
MIT
Version
0.0.7
Deps
1
Size
136 kB
Vulns
0
Weekly
0

sort-x

codecov

Install

Npm: npm install --save sort-x

Yarn: yarn add sort-x

Umd:

<script src="path/sort-x/dist/index.js"></script>
sortX.bubble([3, 4, 2, 1]) // [1, 2, 3, 4]
sortX.selection([3, 4, 2, 1]) // [1, 2, 3, 4]

Demo

import {bubble} from 'sort-x';
// In your render...
bubble([3, 4, 2, 1]) // [1, 2, 3, 4]


import {selection} from 'sort-x';
// In your render...
selection([3, 4, 2, 1]) // [1, 2, 3, 4]

import {insertion} from 'sort-x';
// In your render...
insertion([3, 4, 2, 1]) // [1, 2, 3, 4]

ex: 
Util
import {sorted} from 'sort-x';
sorted([3, 4, 2, 1]) // false
sorted([1, 2, 3, 4]) // true