0.0.5 • Published 2 years ago

custom-sorts v0.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

custom-sorts

This library is custom sort utils.

Installation

npm install custom-sorts

or

yarn add custom-sorts

Usage

This is all you need to get started:

const customSort = require('custom-sorts');
customSort.neSort([{ a: 10 }, { a: 5 }, { a: 20 }, { a: 8 }, {}], 'a', true);
// [ { a: 5 }, { a: 8 }, { a: 10 }, { a: 20 }, {} ]

or es6

import { neSort } from 'custom-sorts';
neSort([{ a: 10 }, { a: 5 }, { a: 20 }, { a: 8 }, {}], 'a', false);
// [ { a: 20 }, { a: 10 }, { a: 8 }, { a: 5 }, {} ]

License

MIT