An open API service indexing awesome lists of open source software.

https://github.com/codewell/reorder-array

Set which element should be at the end of an array
https://github.com/codewell/reorder-array

Last synced: 30 days ago
JSON representation

Set which element should be at the end of an array

Awesome Lists containing this project

README

          

# @codewell/reorder-array
Reorder an array

## Installation
```
npm install @codewell/reorder-array
```

## Basic usage
```JavaScript
import reorderArray from '@codewell/reorder-array';

reorderArray(['a', 'b', 'c'], 0, 2); // => ['b', 'c', 'a']
reorderArray(['a', 'b', 'c'], 2, 0); // => ['c', 'a', 'b']
```