Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wupengfex/mongo-parser

Mongoose schema parser
https://github.com/wupengfex/mongo-parser

Last synced: about 2 months ago
JSON representation

Mongoose schema parser

Awesome Lists containing this project

README

        

# mongo-parser

![NPM Version](https://img.shields.io/npm/v/mongo-parser.svg?style=flat)
![Build Status](https://travis-ci.org/wupengFEX/mongo-parser.svg?branch=master)

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)