some tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-11-26 21:30:00 +03:00
parent 3ba75223ba
commit a8081f3a7c

View File

@ -132,7 +132,7 @@ var TagsPrototype = {
// Match tags...
//
// Match two tags...
// Check if tags match...
// .match(tag, tag)
// -> bool
//
@ -140,6 +140,10 @@ var TagsPrototype = {
// .match(tag)
// -> tags
//
// Filter out non-matching from tags...
// .match(tag, tags)
// -> tags
//
//
// Query syntax:
// a - tag
@ -156,7 +160,7 @@ var TagsPrototype = {
// - component order is maintained.
//
// Example:
// set match no match
// path match no match
// --------------------------------
// a a z
// a/b b/c
@ -192,8 +196,8 @@ var TagsPrototype = {
var that = this
// get matching tags...
if(b == null){
return this.tags()
if(b == null || b instanceof Array){
return (b || this.tags())
.filter(function(tag){
return that.match(a, tag)})