notes + tweaking + a substantial performance fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2018-12-16 05:00:11 +03:00
parent 3dbb59c1e6
commit c1b1efd4d8
2 changed files with 4 additions and 3 deletions

View File

@ -1493,6 +1493,8 @@ object.makeConstructor('BaseTags',
//---------------------------------------------------------------------
// XXX EXPERIMENTAL...
// try using this to implement local tags in collections by defining
// a '/local/*' handler...
var TagsWithHandlersPrototype = {
__proto__: BaseTagsPrototype,

View File

@ -202,7 +202,6 @@ Array.prototype.sortAs = function(other){
// Set...
// Set set operation shorthands...
// XXX should these accept lists of sets???
Set.prototype.unite = function(other){
return new Set([...this, ...other]) }
Set.prototype.intersect = function(other){
@ -210,9 +209,9 @@ Set.prototype.intersect = function(other){
return new Set([...this]
.filter(function(e){ return other[test](e) })) }
Set.prototype.subtract = function(other){
var test = other.has ? 'has' : 'includes'
other = new Set(other)
return new Set([...this]
.filter(function(e){ return !other[test](e) })) }
.filter(function(e){ return !other.has(e) })) }
//---------------------------------------------------------------------