0.1.6 • Published 2 years ago

@src-hyc/tagging v0.1.6

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

Tagging

Tagging is a tagging library with JavaScript and MongoDB.

Installation

Use the package manager npm to install tagging.

npm i @src-hyc/tagging

Usage

import { Tagger } from '@src-hyc/tagging';

const tagger = new Tagger(collection);

tagger.tagKey("key", [ "tag" ]);
tagger.getKeysByTag([ "tag" ]); // returns [ "key" ]

tagger.tagKey("key2", [ "tag_parent", "tag_child" ]);
tagger.getKeysByParentTag([ "tag_parent" ]); // returns [ "key2" ]

// can also parse strings into tag of arrays
tagger.getKeysByTag("tag_parent/tag_child"); // returns [ "key2" ]

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

0.1.6

2 years ago

0.1.4

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago