You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@azure-tools/linq

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure-tools/linq - npm Package Compare versions

Comparing version

to
3.1.222

2

dist/common.d.ts

@@ -11,2 +11,4 @@ export interface Index<T> {

export declare type IndexOf<T> = T extends Map<T, infer V> ? T : T extends Array<infer V> ? number : string;
/** performs a truthy check on the value, and calls onTrue when the condition is true,and onFalse when it's not */
export declare function when<T>(value: T, onTrue: (value: NonNullable<T>) => void, onFalse?: () => void): void;
//# sourceMappingURL=common.d.ts.map

@@ -12,2 +12,7 @@ "use strict";

exports.ToDictionary = ToDictionary;
/** performs a truthy check on the value, and calls onTrue when the condition is true,and onFalse when it's not */
function when(value, onTrue, onFalse = () => { }) {
return value ? onTrue(value) : onFalse();
}
exports.when = when;
//# sourceMappingURL=common.js.map

@@ -9,2 +9,3 @@ import { IndexOf, Dictionary } from './common';

distinct(selector?: (each: T) => any): IterableWithLinq<T>;
duplicates(selector?: (each: T) => any): IterableWithLinq<T>;
first(predicate?: (each: T) => boolean): T | undefined;

@@ -11,0 +12,0 @@ selectNonNullable<V>(selector: (each: T) => V): IterableWithLinq<NonNullable<V>>;

@@ -20,2 +20,3 @@ "use strict";

distinct: distinct.bind(iterable),
duplicates: duplicates.bind(iterable),
first: first.bind(iterable),

@@ -299,2 +300,22 @@ select: select.bind(iterable),

}
function duplicates(selector) {
const hash = new common_1.Dictionary();
return linqify(function* () {
if (!selector) {
selector = i => i;
}
for (const each of this) {
const k = JSON.stringify(selector(each));
if (hash[k] === undefined) {
hash[k] = false;
}
else {
if (hash[k] === false) {
hash[k] = true;
yield each;
}
}
}
}.bind(this)());
}
//# sourceMappingURL=new-linq.js.map

2

package.json
{
"name": "@azure-tools/linq",
"version": "3.1.219",
"version": "3.1.222",
"patchOffset": 100,

@@ -5,0 +5,0 @@ "description": "LINQ-like functionality for Typescript.",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet