Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arrayq

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arrayq - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

es6/none.d.ts

1

es6/index.d.ts

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

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc