minor fix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-11-21 03:37:26 +03:00
parent 032defb38b
commit 62466b83b2
2 changed files with 4 additions and 4 deletions

6
Set.js
View File

@ -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)

View File

@ -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": {