From 62466b83b2296c29e4ab934b4fe82be9fe29902b Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sat, 21 Nov 2020 03:37:26 +0300 Subject: [PATCH] minor fix... Signed-off-by: Alex A. Naanou --- Set.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Set.js b/Set.js index b2451d2..6d62c25 100644 --- a/Set.js +++ b/Set.js @@ -13,7 +13,7 @@ /*********************************************************************/ // Set set operation shorthands... -Set.prototype.unite = function(other){ +Set.prototype.unite = function(other=[]){ return new Set([...this, ...other]) } Set.prototype.intersect = function(other){ var test = other.has ? @@ -22,14 +22,14 @@ Set.prototype.intersect = function(other){ return new Set([...this] .filter(function(e){ return other[test](e) })) } -Set.prototype.subtract = function(other){ +Set.prototype.subtract = function(other=[]){ other = new Set(other) return new Set([...this] .filter(function(e){ return !other.has(e) })) } -Map.prototype.sort = function(keys){ +Map.prototype.sort = function(keys=[]){ keys = (typeof(keys) == 'function' || keys === undefined) ? [...this].sort(keys) diff --git a/package.json b/package.json index e541490..ee039a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-types", - "version": "3.7.12", + "version": "3.7.13", "description": "Generic JavaScript types and type extensions...", "main": "main.js", "scripts": {