coloquent-test2
Version:
Library for retrieving model objects from a JSON-API, with a fluent syntax inspired by Laravel Eloquent.
17 lines • 599 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Reflection = /** @class */ (function () {
function Reflection() {
}
Reflection.getNameOfNthMethodOffStackTrace = function (error, n) {
var re = /@|at [a-zA-Z0-9\.\/_]+\.([a-zA-Z0-9_]+) \(/g;
var stack = error.stack;
for (var i = 0; i < n - 1; i++) {
re.exec(stack);
}
return re.exec(stack)[1]; // exec second time and get submatch
};
return Reflection;
}());
exports.Reflection = Reflection;
//# sourceMappingURL=Reflection.js.map