0.0.1 • Published 12 years ago
mongo-key-escape v0.0.1
mongo-key-escape
Escape MongoDB keys for characters . and $.
Installation
$ npm install mongo-key-escapeExample
var key = require('mongo-key-escape');
key.escape('event.thing');
// event\uFF0Ething
key.unescape('event\uFF0Ething');
// 'event.thing'
key.escape('event$thing');
// event\uFF04thing
key.unescape('event\uFF04thing');
// 'event$thing'License
MIT
0.0.1
12 years ago