0.0.1 • Published 10 years ago
mongo-json-escape v0.0.1
mongo-json-escape
Escape MongoDB reserved characters $
and .
from JSON objects. This way you can store JSON objects containing these characters in your database.
Installation
$ npm install mongo-json-escape
Example
var mje = require('mongo-json-escape');
mje.escape({"hello.world":"hello"});
mje.unescape({"hello\uFF0Eworld":"hello");
key.escape({"hello$world":"hello"});
key.unescape({"hello\uFF04world":"hello"});
License
MIT
0.0.1
10 years ago