mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
cleaned up .normalize(..)
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fbbb9a9b13
commit
012e2a377e
@ -216,9 +216,6 @@ var BaseTagsClassPrototype = {
|
|||||||
subTags: function(...tags){
|
subTags: function(...tags){
|
||||||
return this.splitTag(...tags).flat(Infinity) },
|
return this.splitTag(...tags).flat(Infinity) },
|
||||||
|
|
||||||
|
|
||||||
// Constructor API...
|
|
||||||
//
|
|
||||||
normalizeTagStr: function(...tags){
|
normalizeTagStr: function(...tags){
|
||||||
var ILLEGAL_CHARS = this.TAG_ILLEGAL_CHARS
|
var ILLEGAL_CHARS = this.TAG_ILLEGAL_CHARS
|
||||||
return normalizeSplit(tags)
|
return normalizeSplit(tags)
|
||||||
@ -261,23 +258,18 @@ var BaseTagsClassPrototype = {
|
|||||||
// as possible.
|
// as possible.
|
||||||
//
|
//
|
||||||
normalize: function(...tags){
|
normalize: function(...tags){
|
||||||
var SS = this.SET_SEPARATOR
|
return this.joinTag(
|
||||||
var PS = this.PATH_SEPARATOR
|
|
||||||
var SP = this.SET_SEPARATOR_PATTERN
|
|
||||||
var PP = this.PATH_SEPARATOR_PATTERN
|
|
||||||
var ILLEGAL_CHARS = this.TAG_ILLEGAL_CHARS
|
|
||||||
|
|
||||||
var res = this.joinTag(
|
|
||||||
this.normalizeTagAST(
|
this.normalizeTagAST(
|
||||||
this.splitTag(
|
this.splitTag(
|
||||||
|
// NOTE: we do not need to normalizeSplit(..) here
|
||||||
|
// as it is don down stream...
|
||||||
this.normalizeTagStr(...tags))))
|
this.normalizeTagStr(...tags))))
|
||||||
.unique()
|
.unique()
|
||||||
|
.run(function(){
|
||||||
return (tags.length == 1 && !(tags[0] instanceof Array)) ?
|
return (tags.length == 1 && !(tags[0] instanceof Array)) ?
|
||||||
// NOTE: if we got a single tag return it as a single tag...
|
// NOTE: if we got a single tag return it as a single tag...
|
||||||
res.pop()
|
this.pop()
|
||||||
: res
|
: this }) },
|
||||||
},
|
|
||||||
|
|
||||||
// Query parser...
|
// Query parser...
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user