npm.io
1.1.2 • Published 10 years ago

@f/clone-obj

Licence
MIT
Version
1.1.2
Deps
1
Vulns
0
Weekly
0

clone-obj

Build status Git tag NPM version Code style

Create a shallow copy of an object.

Installation

$ npm install @f/clone-obj

Usage

var cloneObj = require('@f/clone-obj')

cloneObj({a: 1, b: 'test'})

API

cloneObj(obj)
  • obj - The object to be cloned

Returns: A new object, containing identical keys and values.

License

MIT