mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
minor fix + added .hasTag(..)
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2288835f5a
commit
e54ce63dff
@ -329,8 +329,19 @@ var TagsPrototype = {
|
|||||||
.map(function(s){ return [...s[1]] })
|
.map(function(s){ return [...s[1]] })
|
||||||
.flat())] },
|
.flat())] },
|
||||||
|
|
||||||
|
// Testing...
|
||||||
|
// XXX can these be faster???
|
||||||
|
// XXX should these take multiple values???
|
||||||
|
hasTag: function(tag){
|
||||||
|
for(var t of this.tags()){
|
||||||
|
if(this.match(tag, t)){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
has: function(value){
|
has: function(value){
|
||||||
for(var v in Object.values(this.__index)){
|
for(var v of Object.values(this.__index)){
|
||||||
if(v.has(value)){
|
if(v.has(value)){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user