mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
notes + tweaking + a substantial performance fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3dbb59c1e6
commit
c1b1efd4d8
@ -1493,6 +1493,8 @@ object.makeConstructor('BaseTags',
|
|||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
// XXX EXPERIMENTAL...
|
// XXX EXPERIMENTAL...
|
||||||
|
// try using this to implement local tags in collections by defining
|
||||||
|
// a '/local/*' handler...
|
||||||
var TagsWithHandlersPrototype = {
|
var TagsWithHandlersPrototype = {
|
||||||
__proto__: BaseTagsPrototype,
|
__proto__: BaseTagsPrototype,
|
||||||
|
|
||||||
|
|||||||
@ -202,7 +202,6 @@ Array.prototype.sortAs = function(other){
|
|||||||
// Set...
|
// Set...
|
||||||
|
|
||||||
// Set set operation shorthands...
|
// Set set operation shorthands...
|
||||||
// XXX should these accept lists of sets???
|
|
||||||
Set.prototype.unite = function(other){
|
Set.prototype.unite = function(other){
|
||||||
return new Set([...this, ...other]) }
|
return new Set([...this, ...other]) }
|
||||||
Set.prototype.intersect = function(other){
|
Set.prototype.intersect = function(other){
|
||||||
@ -210,9 +209,9 @@ Set.prototype.intersect = function(other){
|
|||||||
return new Set([...this]
|
return new Set([...this]
|
||||||
.filter(function(e){ return other[test](e) })) }
|
.filter(function(e){ return other[test](e) })) }
|
||||||
Set.prototype.subtract = function(other){
|
Set.prototype.subtract = function(other){
|
||||||
var test = other.has ? 'has' : 'includes'
|
other = new Set(other)
|
||||||
return new Set([...this]
|
return new Set([...this]
|
||||||
.filter(function(e){ return !other[test](e) })) }
|
.filter(function(e){ return !other.has(e) })) }
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user