Since mongoose can't store some keywords, sucha as $
, .
and so on, so mongo-parser is aim at code conversion.
- node 6+
npm i mongo-parser --save
escape for object or string, for example
const msp = require('mongo-parser');
msp.escape(obj);
escape for object or string, for example
const msp = require('mongo-parser');
msp.unescape(obj);