Comparing version 0.1.8 to 0.1.9
@@ -14,2 +14,3 @@ export { default as contains } from './contains'; | ||
export { default as all } from './all'; | ||
export { default as none } from './none'; | ||
export { default as where } from './where'; |
@@ -28,4 +28,6 @@ "use strict"; | ||
exports.all = all_1.default; | ||
var none_1 = require("./none"); | ||
exports.none = none_1.default; | ||
var where_1 = require("./where"); | ||
exports.where = where_1.default; | ||
//# sourceMappingURL=index.js.map |
@@ -6,2 +6,3 @@ import { ItemPredicate, LeftRightPredicate, Projector, ProjectMany } from './types'; | ||
qAll(predicate: ItemPredicate<T>): boolean; | ||
qNone(predicate?: ItemPredicate<T>): boolean; | ||
qContains<TR>(right: TR[], comparer?: LeftRightPredicate<T, TR>): boolean; | ||
@@ -8,0 +9,0 @@ qIntersect<TR>(right: TR[], comparer?: LeftRightPredicate<T, TR>): T[]; |
@@ -73,2 +73,7 @@ "use strict"; | ||
} | ||
if (!Array.prototype.qNone) { | ||
Array.prototype.qNone = function (predicate) { | ||
return lib.none(this, predicate); | ||
}; | ||
} | ||
if (!Array.prototype.qWhere) { | ||
@@ -75,0 +80,0 @@ Array.prototype.qWhere = function (predicate) { |
@@ -14,2 +14,3 @@ export { default as contains } from './contains'; | ||
export { default as all } from './all'; | ||
export { default as none } from './none'; | ||
export { default as where } from './where'; |
@@ -9,2 +9,3 @@ import * as lib from './index'; | ||
qAll(predicate: ItemPredicate<T>): boolean; | ||
qNone(predicate?: ItemPredicate<T>): boolean; | ||
qContains<TR>(right: TR[], comparer?: LeftRightPredicate<T, TR>): boolean; | ||
@@ -95,2 +96,7 @@ qIntersect<TR>(right: TR[], comparer?: LeftRightPredicate<T, TR>): T[]; | ||
} | ||
if (!Array.prototype.qNone) { | ||
Array.prototype.qNone = function<T>(predicate?: ItemPredicate<T>) { | ||
return lib.none(this, predicate); | ||
}; | ||
} | ||
if (!Array.prototype.qWhere) { | ||
@@ -97,0 +103,0 @@ Array.prototype.qWhere = function<T>(predicate: ItemPredicate<T>) { |
{ | ||
"name": "arrayq", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"description": "Array query methods for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "es6/prototype.js", |
@@ -192,2 +192,17 @@ const assert = require('assert'); | ||
describe('qNone', function() { | ||
it('should return false when not empty', function() { | ||
assert(![1].qNone()); | ||
}); | ||
it('should return true when empty', function() { | ||
assert([].qNone()); | ||
}); | ||
it('should return false', function() { | ||
assert(![1].qNone(x => x === 1)); | ||
}); | ||
it('should return true', function() { | ||
assert([2].qNone(x => x === 1)); | ||
}); | ||
}); | ||
describe('qWhere', function() { | ||
@@ -194,0 +209,0 @@ it('should have even numbers', function() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
164893
88
4647
0