Simple engine to manage items, with arbitrary data and associated tags

npm install simpletags
4 downloads in the last week
8 downloads in the last month


Simple engine to manage items, with arbitrary data and associated tags.


Via npm on Node:

npm install simpletags

Reference in your program:

var simpletags = require('simpletags');


Create engine

var engine = simpletags.createEngine();

Create item in engine:

var itemId = engine.createItem('', [ 'nodejs', 'javascript', 'engine', 'programming' ]);

An item has

  • data: Arbitrary value you supplied
  • tags: An array of tags. A tag could be a non-empty string or an object with only one property with non-empty value.

Once created, the item has an associated id, supplied by the engine.

An example with object and string tags:

var itemId = engine.createItem('contract.doc', [ 'legal', 'document', { author: 'adam' } ]);

Search items by tags:

var items = engine.getItems([ 'nodejs', 'javascript', 'engine', 'programming' ]);

The return value is an array of items. Each item is a simple object with id, data, and tags properties.

Get item by id:

var item = engine.getItemById(itemId);

The return value is a simple object, with id, data, and tags properties.



To do

  • Update an item.
  • Remove an item.
  • Better internal tag structure and search algorithm.


  • 2013-01-15: Version 0.0.1 published, with createEngine, createItem, getItemById, getItems.


Feel free to file issues and submit pull requests � contributions are welcome.

If you submit a pull request, please be sure to add or update corresponding test cases, and ensure that npm test continues to pass.

npm loves you