https://github.com/afeiship/next-each-sibling
Each sibling for next.
https://github.com/afeiship/next-each-sibling
each next sibling walk
Last synced: about 1 month ago
JSON representation
Each sibling for next.
- Host: GitHub
- URL: https://github.com/afeiship/next-each-sibling
- Owner: afeiship
- License: mit
- Created: 2019-06-19T05:08:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-10-21T03:21:49.000Z (over 4 years ago)
- Last Synced: 2025-05-31T18:26:48.848Z (about 1 year ago)
- Topics: each, next, sibling, walk
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-each-sibling
> Each sibling for next.
[![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-each-sibling
```
## usage
```js
import '@jswork/next-each-sibling';
const indexes = [4, 8, 12];
const res = [];
nx.eachSibling(indexes, (cur, next) => {
res.push([cur, next]);
});
// result
[
[4, 8],
[8, 12]
];
```
## license
Code released under [the MIT license](https://github.com/afeiship/next-each-sibling/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-each-sibling
[version-url]: https://npmjs.org/package/@jswork/next-each-sibling
[license-image]: https://img.shields.io/npm/l/@jswork/next-each-sibling
[license-url]: https://github.com/afeiship/next-each-sibling/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-each-sibling
[size-url]: https://github.com/afeiship/next-each-sibling/blob/master/dist/next-each-sibling.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-each-sibling
[download-url]: https://www.npmjs.com/package/@jswork/next-each-sibling