mirror of https://github.com/seald/nedb
parent
d40601785c
commit
d6da8b7d8d
@ -0,0 +1,19 @@ |
||||
/** |
||||
* Handle models (i.e. docs) |
||||
* Serialization/deserialization |
||||
* Copying |
||||
*/ |
||||
|
||||
function serialize (obj) { |
||||
return JSON.stringify(obj); |
||||
} |
||||
|
||||
function deserialize (rawData) { |
||||
return JSON.parse(rawData); |
||||
} |
||||
|
||||
|
||||
// Interface
|
||||
module.exports.serialize = serialize; |
||||
module.exports.deserialize = deserialize; |
||||
|
Loading…
Reference in new issue