# @f/clone-shallow

> Create a shallow clone of an object or array

Latest version **1.1.4** (published 2017-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/clone-shallow
pnpm add @f/clone-shallow
yarn add @f/clone-shallow
bun add @f/clone-shallow
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2017-01-27 |
| First published | 2015-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/clone-shallow
- Repository: https://github.com/micro-js/clone-shallow
- Homepage: https://github.com/micro-js/clone-shallow#readme
- Issues: https://github.com/micro-js/clone-shallow/issues
- npm.io page: https://npm.io/package/@f/clone-shallow

## Dependencies (3)

- [@f/slice](https://npm.io/package/@f/slice.md) ^1.1.2
- [@f/is-array](https://npm.io/package/@f/is-array.md) ^1.1.1
- [@f/clone-obj](https://npm.io/package/@f/clone-obj.md) ^1.1.0

## Recent versions

- 1.1.4 (latest) — 2017-01-27
- 1.1.3 — 2016-02-23
- 1.1.2 — 2015-12-16
- 1.1.1 — 2015-12-16
- 1.1.0 — 2015-12-16

## README

# clone-shallow

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Create a shallow clone of an object or array

## Installation

    $ npm install @f/clone-shallow

## Usage

```js
var clone = require('@f/clone-shallow')

var arr = [1, 2, 3, 4]
var newArr = clone(arr)

deepEqual(arr, newArr)
arr !== newArr

var obj = {a: 1, b: 2, c: 3}
var newObj = clone(obj)

deepEqual(obj, newObj)
obj !== newObj
```

## API

### cloneShallow(a)

- `a` - The object or array to be cloned

**Returns:** A new object or array with identical contents to `a`.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/clone-shallow.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/clone-shallow
[git-image]: https://img.shields.io/github/tag/micro-js/clone-shallow.svg?style=flat-square
[git-url]: https://github.com/micro-js/clone-shallow
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/clone-shallow.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/clone-shallow

---
_Source: https://npm.io/package/@f/clone-shallow · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
