clone-array

0.1.2 • Public • Published

clone-array NPM version

Create a clone of an array.

Install

$ npm i clone-array --save-dev

Usage

var a = ['a', 'b', 'c'];
var b = cloneArray(a);
= a.concat('new');
 
console.log('a:', a);
//=> a: [ 'a', 'b', 'c', 'new' ]
 
console.log('b:', b);
//=> b: [ 'a', 'b', 'c' ]

Related projects

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on August 23, 2015.

Package Sidebar

Install

npm i clone-array

Weekly Downloads

395

Version

0.1.2

License

MIT

Last publish

Collaborators

  • jonschlinkert