1.0.3 • Published 6 years ago
clone-data v1.0.3
Readme
Clone JS Objects without worrying about Circular
data and key names not suitable for MongoDB
Details here
Use
npm install clone-data
const cloneData = require('clone-data');
...
let myData = cloneData.clone(oldData);
// encode / decode
let query = { $ne: true };
query = cloneData.encode(query); // { [$]ne: true }
query = cloneData.decode(query); // { $ne: true }
Origin
The code is based (or copied from):
Original author
The original author for that code is Yurij Mikhalevich