{"_id":"arr-rotate","_rev":"310610","name":"arr-rotate","description":"Rotate all items in an array","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"kevva","email":""}],"time":{"modified":"2021-06-03T19:46:40.000Z","created":"2018-03-27T14:45:29.056Z","1.0.0":"2018-03-27T14:45:29.056Z"},"users":{},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"repository":{"type":"git","url":"git+https://github.com/kevva/arr-rotate.git"},"versions":{"1.0.0":{"name":"arr-rotate","version":"1.0.0","description":"Rotate all items in an array","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/arr-rotate.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["array","move","rotate","shift","splice"],"devDependencies":{"ava":"*","xo":"*"},"gitHead":"4f99b942d5f6b113f3475645194da1598821a720","bugs":{"url":"https://github.com/kevva/arr-rotate/issues"},"homepage":"https://github.com/kevva/arr-rotate#readme","_id":"arr-rotate@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"c11877d06a0a42beb39ab8956a06779d9b71d248","size":1545,"noattachment":false,"key":"/arr-rotate/-/arr-rotate-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/arr-rotate/download/arr-rotate-1.0.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/arr-rotate_1.0.0_1522161928970_0.37133679989649604"},"_hasShrinkwrap":false,"publish_time":1522161929056,"_cnpm_publish_time":1522161929056}},"readme":"# arr-rotate [![Build Status](https://travis-ci.org/kevva/arr-rotate.svg?branch=master)](https://travis-ci.org/kevva/arr-rotate)\n\n> Rotate all items in an array\n\n\n## Install\n\n```\n$ npm install arr-rotate\n```\n\n\n## Usage\n\n```js\nconst arrRotate = require('arr-rotate');\n\narrRotate(['foo', 'bar', 'unicorn'], 2);\n//=> ['bar', 'unicorn', 'foo']\n\narrRotate(['foo', 'bar', 'unicorn'], 1);\n//=> ['unicorn', 'foo', 'bar']\n\narrRotate(['foo', 'bar', 'unicorn'], -1);\n//=> ['bar', 'unicorn', 'foo']\n```\n\n\n## API\n\n### arrRotate(input, num)\n\n#### input\n\nType: `Array`\n\nArray to rotate.\n\n#### num\n\nType: `number`<br>\nDefault: `0`\n\nNumber of steps to rotate.\n\n\n## License\n\nMIT © [Kevin Martensson](https://github.com/kevva)\n","_attachments":{},"homepage":"https://github.com/kevva/arr-rotate#readme","bugs":{"url":"https://github.com/kevva/arr-rotate/issues"},"license":"MIT"}