Noisy Pneumatic Mnemonic
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

lbg-mongoose-utils

0.0.11 • Public • Published

lbg-mongoose-utils

A small collection of mongoose extensions to be used in my projects.

Current modules:

slugify

creates unique slugs for assigned items.

ancestorTree

helps maintaining hierarchical items. use array of ancestors pattern can be seen here: http://docs.mongodb.org/manual/tutorial/model-tree-structures-with-ancestors-array/

status

adds status field and adds static methods:

  • publishDocument,
  • unPublishDocument
  • trashDocument.

usage of status module:

model.publishDocument(id, function(err, result) {
	console.log(result)
});

Keywords

none

install

npm i lbg-mongoose-utils

Downloadsweekly downloads

10

version

0.0.11

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability