npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

array-invert

1.0.2

@yoshuawuyts

npmHomeRepoSnykSocket
Downloads:0
$ npm install array-invert
DailyWeeklyMonthlyYearly

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