@nodesecure/utils
Version:
NodeSecure utilities
11 lines • 432 B
JavaScript
/**
* @description Transform a JS-X-Ray location to string, example: [[3, 4], [3, 37]]
* The first array is the start with [line, column]
* The second one is the end with [line, column]
*/
export function locationToString(location) {
const start = `${location[0][0]}:${location[0][1]}`;
const end = `${location[1][0]}:${location[1][1]}`;
return `[${start}] - [${end}]`;
}
//# sourceMappingURL=locationToString.js.map