https://github.com/wupengfex/mongo-parser
Mongoose schema parser
https://github.com/wupengfex/mongo-parser
Last synced: 5 months ago
JSON representation
Mongoose schema parser
- Host: GitHub
- URL: https://github.com/wupengfex/mongo-parser
- Owner: wupengFEX
- License: mit
- Created: 2018-09-21T06:53:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-24T05:04:54.000Z (about 6 years ago)
- Last Synced: 2025-02-19T22:43:44.518Z (5 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# mongo-parser

Since mongoose can't store some keywords, sucha as `$`, `.` and so on, so mongo-parser is aim at code conversion.
## Basic
- node 6+
## Usage
`npm i mongo-parser --save`
## API
### `escape(object)`
escape for object or string, for example
```
const msp = require('mongo-parser');
msp.escape(obj);
```### `unescape(object)`
escape for object or string, for example
```
const msp = require('mongo-parser');
msp.unescape(obj);
```### License
[MIT](https://github.com/wupengFEX/mongo-parser/blob/master/LICENSE)