1.0.2 • Published 10 years ago

array-invert v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

array-invert

NPM version build status Test coverage

Invert a JavaScript array. Though you probably want to use array.reverse() instead.

Installation

$ npm i --save array-invert

Overview

var invert = require('array-invert');

invert([1, 2, 3, 4, 5]);
// => [5, 4, 3, 2, 1]

API

invert(array)

Invert the order of an array.

invert(['chicken', 'cow', 'pig']);
// => ['pig', 'cow', 'chicken']

License

MIT © Yoshua Wuyts