Added hasTag() method to wiki store

This commit is contained in:
Jeremy Ruston 2011-12-08 16:19:19 +00:00
parent 6d727437e7
commit e9d3a878c1
1 changed files with 11 additions and 0 deletions

View File

@ -59,6 +59,17 @@ var Tiddler = function(/* tiddler,fields */) {
}
};
Tiddler.prototype.hasTag = function(tag) {
if(this.tags) {
for(var t=0; t<this.tags.length; t++) {
if(this.tags[t] === tag) {
return true;
}
}
}
return false;
};
Tiddler.prototype.parseTiddlerField = function(name,value) {
var type = Tiddler.specialTiddlerFields[name];
if(type) {