Innovenergy_trunk/frontend/node_modules/testcafe/lib/utils/callsite.js

18 lines
1.8 KiB
JavaScript
Raw Permalink Normal View History

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCallsiteId = exports.getCallsiteStackFrameString = void 0;
/**
* Gets the callsite stackFrame string representation: 'filename:lineNum:colNum'
*/
function getCallsiteStackFrameString(callsite) {
return callsite.stackFrames[callsite.callsiteFrameIdx].toString();
}
exports.getCallsiteStackFrameString = getCallsiteStackFrameString;
/**
* Gets the callsite filename and lineNum in the following format: 'filename:lineNum'
*/
function getCallsiteId(callsite) {
return `${callsite.filename}:${callsite.lineNum}`;
}
exports.getCallsiteId = getCallsiteId;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsbHNpdGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvY2FsbHNpdGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUE7O0VBRUU7QUFDRixTQUFnQiwyQkFBMkIsQ0FBRSxRQUFhO0lBQ3RELE9BQU8sUUFBUSxDQUFDLFdBQVcsQ0FBQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxRQUFRLEVBQUUsQ0FBQztBQUN0RSxDQUFDO0FBRkQsa0VBRUM7QUFFRDs7RUFFRTtBQUNGLFNBQWdCLGFBQWEsQ0FBRSxRQUFhO0lBQ3hDLE9BQU8sR0FBRyxRQUFRLENBQUMsUUFBUSxJQUFJLFFBQVEsQ0FBQyxPQUFPLEVBQUUsQ0FBQztBQUN0RCxDQUFDO0FBRkQsc0NBRUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiogR2V0cyB0aGUgY2FsbHNpdGUgc3RhY2tGcmFtZSBzdHJpbmcgcmVwcmVzZW50YXRpb246ICdmaWxlbmFtZTpsaW5lTnVtOmNvbE51bSdcbiovXG5leHBvcnQgZnVuY3Rpb24gZ2V0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