@ts-common/source-map
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -37,2 +37,3 @@ import { StringMap } from "@ts-common/string-map"; | ||
export declare const getFileInfo: (info: Info) => FileInfo; | ||
export declare const getPath: (info: Info) => ReadonlyArray<string | number>; | ||
export {}; |
14
index.js
@@ -84,2 +84,16 @@ "use strict"; | ||
exports.getFileInfo = (info) => info.kind === "file" ? info : exports.getFileInfo(info.parent); | ||
const getReversedPath = (info) => { | ||
function* iterator() { | ||
if (info.kind === "file") { | ||
return; | ||
} | ||
let o = info; | ||
while (o.parent.kind !== "file") { | ||
yield o.property; | ||
o = o.parent; | ||
} | ||
} | ||
return _.iterable(iterator); | ||
}; | ||
exports.getPath = (info) => _.reverse(getReversedPath(info)); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@ts-common/source-map", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "Source Map", | ||
@@ -44,3 +44,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@ts-common/iterator": "0.0.34", | ||
"@ts-common/iterator": "0.0.35", | ||
"@ts-common/json": "0.0.15", | ||
@@ -47,0 +47,0 @@ "@ts-common/property-set": "0.0.7", |
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
18443
135
+ Added@ts-common/iterator@0.0.35(transitive)
- Removed@ts-common/iterator@0.0.34(transitive)
Updated@ts-common/iterator@0.0.35