Package Exports
- arraypermutation-node
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arraypermutation-node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
permutation
make permutation of a array given.
Install
This method permutate the item in a array given
$ npm install arraypermutation-node
Usage
const permutate = require('arraypermutation-node')
permutate.right([1,2]) // -> [2,1]
permutate.right([1,2,3,4,5,6]) // -> [6,1,2,3,4,5]
permutate.left([1,2]) // -> [2,1]
permutate.left([1,2,3,4])// -> [2,3,4,1]
permutate.left([1]) // [1]
permutate.right([1]) // [1]
API Documentation permutation -> object
permutation.right(array) -> array
The param is the right what will be permutated to right. The array is passed by reference.
permutation.left(array) -> array
The param is the left what will be permutated to left. The array is passed by reference.