jiggle
Jiggle arrays to slightly rearrange their values
Installation
npm install jiggle --save
Usage
var jiggle = // The jiggle() function takes an array as input and returns an array// [ 1, 2, 0, 4, 3, 5, 6, 7, 9, 8 ] // It can also jiggle strings// jbbeawockyr // It always returns a new object without altering the originalvar orig = "a""b""c""d""e""f"var dupe = // orig: ['a','b','c','d','e','f']// dupe: ['a','b','d','e','c','f'] // And if you like jiggling you can keep on doing it// supcaerligralitiiscpefaldioxciosiu
Tests
npm installnpm test