@emartech/data-aggregator-language
Advanced tools
Comparing version 2.4.1 to 2.4.2
@@ -29,3 +29,3 @@ { | ||
}, | ||
"version": "2.4.1" | ||
"version": "2.4.2" | ||
} |
@@ -163,2 +163,6 @@ 'use strict'; | ||
}); | ||
it('works for properties that are not defined', function() { | ||
expect(aggregate('EMPTY UNION programs.foo')).to.eql(true); | ||
}); | ||
}); | ||
@@ -165,0 +169,0 @@ |
@@ -40,3 +40,3 @@ 'use strict'; | ||
union(propertyName) { | ||
return this._data.map(propertyName).flatten().uniq().value(); | ||
return this._data.map(propertyName).reject(x => typeof (x) === 'undefined').flatten().uniq().value(); | ||
} | ||
@@ -43,0 +43,0 @@ |
@@ -54,3 +54,12 @@ 'use strict'; | ||
}); | ||
it('returns empty array for non-existent property names', function() { | ||
const data = [ | ||
{ | ||
date: '2017-08-19' | ||
} | ||
]; | ||
expect(Period.create(data).union('non.existent.data.set')).to.eql([]); | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25960
624