# @writetome51/array-get-copy

> Returns independent copy of a passed array

Latest version **1.1.3** (published 2019-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @writetome51/array-get-copy
pnpm add @writetome51/array-get-copy
yarn add @writetome51/array-get-copy
bun add @writetome51/array-get-copy
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2019-04-10 |
| First published | 2018-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | array, manipulation, return, data |

## Links

- npm: https://www.npmjs.com/package/@writetome51/array-get-copy
- Homepage: https://github.com/writetome51/array-get-copy#readme
- npm.io page: https://npm.io/package/@writetome51/array-get-copy

## Dependencies (2)

- [error-if-not-array](https://npm.io/package/error-if-not-array.md) ~1.0.0
- [@writetome51/array-get-merged-arrays](https://npm.io/package/@writetome51/array-get-merged-arrays.md) ~1.1.3

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2019-04-10
- 1.1.2 — 2019-02-25
- 1.1.1 — 2018-12-07
- 1.1.0 — 2018-11-12
- 1.0.0 — 2018-10-15

## README

# getCopy(array): any[]

Returns an identical but independent copy of `array`, not linked by reference to the original.

## Example
```
let arr = [1,2,3,4,5];  
let copy = getCopy(arr);  
copy.push(10); // copy is now [1,2,3,4,5,10]

// But the original is still the same:
console.log(arr);
// --> '[1,2,3,4,5]'
```
## Installation
`npm i  @writetome51/array-get-copy`


## Loading
```
// if using TypeScript:
import {getCopy} from '@writetome51/array-get-copy';
// if using ES5 JavaScript
var getCopy = require('@writetome51/array-get-copy').getCopy;
```

---
_Source: https://npm.io/package/@writetome51/array-get-copy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
