@snipsonian/core
Version:
Core/base reusable javascript code snippets
15 lines (14 loc) • 439 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
function getPartBetween({ firstPart, secondPart, input, }) {
try {
return getPartAfter({ separator: firstPart, input }).split(secondPart)[0];
}
catch (e) {
return undefined;
}
}
exports.default = getPartBetween;
function getPartAfter({ separator, input }) {
return input.substr(input.indexOf(separator) + separator.length);
}