1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = createDependencyLocation;
|
7 |
|
8 | function createDependencyLocation(start, moduleSpecifier, lineOffset = 0, columnOffset = 0, // Imports are usually wrapped in quotes
|
9 | importWrapperLength = 2) {
|
10 | return {
|
11 | filePath: moduleSpecifier,
|
12 | start: {
|
13 | line: start.line + lineOffset,
|
14 | column: start.column + columnOffset
|
15 | },
|
16 | end: {
|
17 | line: start.line + lineOffset,
|
18 | column: start.column + moduleSpecifier.length - 1 + importWrapperLength + columnOffset
|
19 | }
|
20 | };
|
21 | } |
\ | No newline at end of file |