0.0.7 • Published 9 years ago

dwnz-mongo-clean v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

mongo-clean

Cleans unneeded stuff of mongo entities before sending them out over AJAX.

Installing

npm install dwnz-mongo-clean --save

Setup

var cleaner = require('dwnz-mongo-clean');

Settings

You can supply keys that you want to ignore on an application wide context.

cleaner.addGlobalKey('KeyToIgnore');

Using

var item = {
	Name: "Mongo",
	AccountKey: "123"
};

var cleanItem = cleaner.clean(item);

You can also specify keys to ignore in specific cleaning cases

var item = {
	Name: "Mongo",
	AccountKey: "123",
	Test: "Test"
};

var cleanItem = cleaner.clean(item, ['Test']);

Running Tests

npm test
0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

10 years ago