@azure-tools/linq
Advanced tools
Comparing version 3.1.211 to 3.1.212
@@ -11,3 +11,5 @@ interface AnyObject { | ||
export declare function visitor(instance: AnyObject): Iterable<Leaf>; | ||
export declare function refCount(instance: AnyObject, target: AnyObject): number; | ||
export declare function references(instance: AnyObject, target: AnyObject): Iterable<AnyObject>; | ||
export {}; | ||
//# sourceMappingURL=visitor.d.ts.map |
@@ -56,2 +56,20 @@ "use strict"; | ||
exports.visitor = visitor; | ||
function refCount(instance, target) { | ||
let count = 0; | ||
for (const each of visitor(instance)) { | ||
if (target === instance.instance) { | ||
count++; | ||
} | ||
} | ||
return count; | ||
} | ||
exports.refCount = refCount; | ||
function* references(instance, target) { | ||
for (const each of visitor(instance)) { | ||
if (each === instance.instance) { | ||
yield instance; | ||
} | ||
} | ||
} | ||
exports.references = references; | ||
//# sourceMappingURL=visitor.js.map |
{ | ||
"name": "@azure-tools/linq", | ||
"version": "3.1.211", | ||
"version": "3.1.212", | ||
"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
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
80331
1053