Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-partition
Creates an array of elements split into two groups.
https://github.com/afeiship/next-partition
next part partition slice
Last synced: 1 day ago
JSON representation
Creates an array of elements split into two groups.
- Host: GitHub
- URL: https://github.com/afeiship/next-partition
- Owner: afeiship
- License: mit
- Created: 2017-09-21T01:19:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-18T05:35:43.000Z (over 3 years ago)
- Last Synced: 2024-09-01T16:29:45.621Z (about 1 month ago)
- Topics: next, part, partition, slice
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-partition
> Creates an array of elements split into two groups.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-partition
```## usage
```js
import '@jswork/next-partition';const rs = nx.partition([1, 2, 3], function(_, n) {
return n % 2;
});//result:
[
[1,3],
[2]
]
```## license
Code released under [the MIT license](https://github.com/afeiship/next-partition/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-partition
[version-url]: https://npmjs.org/package/@jswork/next-partition[license-image]: https://img.shields.io/npm/l/@jswork/next-partition
[license-url]: https://github.com/afeiship/next-partition/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-partition
[size-url]: https://github.com/afeiship/next-partition/blob/master/dist/next-partition.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-partition
[download-url]: https://www.npmjs.com/package/@jswork/next-partition