@file-services/utils
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -115,3 +115,3 @@ "use strict"; | ||
} | ||
return null; | ||
return undefined; | ||
} | ||
@@ -251,3 +251,3 @@ function findFilesInAncestorsSync(initialDirectoryPath, fileName) { | ||
} | ||
return null; | ||
return undefined; | ||
} | ||
@@ -254,0 +254,0 @@ async function findFilesInAncestors(initialDirectoryPath, fileName) { |
@@ -12,3 +12,6 @@ export declare class SetMultiMap<K, V> implements Iterable<[K, V]> { | ||
[Symbol.iterator](): IterableIterator<[K, V]>; | ||
entries(): IterableIterator<[K, V]>; | ||
values(): IterableIterator<V>; | ||
keys(): IterableIterator<K>; | ||
} | ||
//# sourceMappingURL=set-multi-map.d.ts.map |
@@ -50,3 +50,6 @@ "use strict"; | ||
} | ||
*[Symbol.iterator]() { | ||
[Symbol.iterator]() { | ||
return this.entries(); | ||
} | ||
*entries() { | ||
const { map } = this; | ||
@@ -59,4 +62,15 @@ for (const [key, valueSet] of map.entries()) { | ||
} | ||
*values() { | ||
const { map } = this; | ||
for (const valueSet of map.values()) { | ||
for (const value of valueSet) { | ||
yield value; | ||
} | ||
} | ||
} | ||
keys() { | ||
return this.map.keys(); | ||
} | ||
} | ||
exports.SetMultiMap = SetMultiMap; | ||
//# sourceMappingURL=set-multi-map.js.map |
@@ -111,3 +111,3 @@ const returnsTrue = () => true; | ||
} | ||
return null; | ||
return undefined; | ||
} | ||
@@ -245,3 +245,3 @@ function findFilesInAncestorsSync(initialDirectoryPath, fileName) { | ||
} | ||
return null; | ||
return undefined; | ||
} | ||
@@ -248,0 +248,0 @@ async function findFilesInAncestors(initialDirectoryPath, fileName) { |
@@ -12,3 +12,6 @@ export declare class SetMultiMap<K, V> implements Iterable<[K, V]> { | ||
[Symbol.iterator](): IterableIterator<[K, V]>; | ||
entries(): IterableIterator<[K, V]>; | ||
values(): IterableIterator<V>; | ||
keys(): IterableIterator<K>; | ||
} | ||
//# sourceMappingURL=set-multi-map.d.ts.map |
@@ -48,3 +48,6 @@ export class SetMultiMap { | ||
} | ||
*[Symbol.iterator]() { | ||
[Symbol.iterator]() { | ||
return this.entries(); | ||
} | ||
*entries() { | ||
const { map } = this; | ||
@@ -57,3 +60,14 @@ for (const [key, valueSet] of map.entries()) { | ||
} | ||
*values() { | ||
const { map } = this; | ||
for (const valueSet of map.values()) { | ||
for (const value of valueSet) { | ||
yield value; | ||
} | ||
} | ||
} | ||
keys() { | ||
return this.map.keys(); | ||
} | ||
} | ||
//# sourceMappingURL=set-multi-map.js.map |
{ | ||
"name": "@file-services/utils", | ||
"description": "Common file system utility functions.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "cjs/index.js", | ||
@@ -14,3 +14,3 @@ "module": "esm/index.js", | ||
"dependencies": { | ||
"@file-services/types": "^2.0.0" | ||
"@file-services/types": "^2.0.1" | ||
}, | ||
@@ -30,3 +30,3 @@ "files": [ | ||
"sideEffects": false, | ||
"gitHead": "1a5d5c8e7ab35d213ba47fe0585ec5887df08d7c" | ||
"gitHead": "fc4bf2d1f67151dfd6357fcda60bc0c43f6a10d6" | ||
} |
@@ -145,3 +145,3 @@ import { | ||
function findClosestFileSync(initialDirectoryPath: string, fileName: string): string | null { | ||
function findClosestFileSync(initialDirectoryPath: string, fileName: string): string | undefined { | ||
let currentPath = resolve(initialDirectoryPath); | ||
@@ -159,3 +159,3 @@ let lastPath: string | undefined; | ||
return null; | ||
return undefined; | ||
} | ||
@@ -309,3 +309,3 @@ | ||
} | ||
async function findClosestFile(initialDirectoryPath: string, fileName: string): Promise<string | null> { | ||
async function findClosestFile(initialDirectoryPath: string, fileName: string): Promise<string | undefined> { | ||
let currentPath = resolve(initialDirectoryPath); | ||
@@ -323,3 +323,3 @@ let lastPath: string | undefined; | ||
return null; | ||
return undefined; | ||
} | ||
@@ -326,0 +326,0 @@ |
@@ -54,3 +54,7 @@ export class SetMultiMap<K, V> implements Iterable<[K, V]> { | ||
public *[Symbol.iterator](): IterableIterator<[K, V]> { | ||
public [Symbol.iterator](): IterableIterator<[K, V]> { | ||
return this.entries(); | ||
} | ||
public *entries(): IterableIterator<[K, V]> { | ||
const { map } = this; | ||
@@ -63,2 +67,15 @@ for (const [key, valueSet] of map.entries()) { | ||
} | ||
public *values(): IterableIterator<V> { | ||
const { map } = this; | ||
for (const valueSet of map.values()) { | ||
for (const value of valueSet) { | ||
yield value; | ||
} | ||
} | ||
} | ||
public keys(): IterableIterator<K> { | ||
return this.map.keys(); | ||
} | ||
} |
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
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
92851
1394
Updated@file-services/types@^2.0.1