@kamyar-nemati/replica
v1.0.1
Published
JavaScript Object Replicator
Downloads
3
Maintainers
Readme
Replica
JavaScript Object Replicator
Overview
Replica is a JavaScript library that provides a way to clone objects. Nested properties such as literals, arrays, objects, and functions are covered.
Usage
- Install the package
npm i @kamyar-nemati/replica
- Import the package
import { deepCopy } from '@kamyar-nemati/replica';
- Finally:
let cloneObject = Object();
// copying 'originalObject' into 'cloneObject'
deepCopy(cloneObject, originalObject);
/**
* clone object's properties will be
* independent from originla object.
*/