mongoify
Converts:
foo: bar: 1 date: '2014-01-01T00:00:00Z' regex: /foo/i bla: undefined
To this:
foo: bar: 1 date: $date: '2014-01-01T00:00:00Z' regex: $regex: 'foo' $options: 'i' bla: $undefined: true
What?
This is called MongoDB Extended JSON.
Why?
So that you can JSON.stringify
the object for easy storage or
transport.
Installation
npm install mongoify
Usage
var mongoify = var obj = date: '2014-01-01T00:00:00Z' console
License
MIT