Skip to content

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

License

Notifications You must be signed in to change notification settings

appmechanix/mongo-clean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published