1.1.1 • Published 8 years ago

lodash-move v1.1.1

Weekly downloads
6,648
License
MIT
Repository
github
Last release
8 years ago

_.move LoDash mixin

Move an item in an array

npm install lodash-move

LoDash issue is here. Give it a 👍 if you want to see it added to Lodash.

Example

move(['a', 'b', 'c'], 2, 0)
// -> ['c', 'a', 'b']

move([{name: 'Fred'}, {name: 'Barney'}, {name: 'Wilma'}, {name: 'Betty'}], 2, 1)
// -> [{name: 'Fred', name: 'Wilman', name: 'Barney', name: 'Betty'}]