UNPKG

vue-app-sdk

Version:
15 lines (14 loc) 581 B
"use strict"; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } }); var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; function insertWrapDetails(source, details) { var length = details.length; if (!length) { return source; } var lastIndex = length - 1; details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex]; details = details.join(length > 2 ? ", " : " "); return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n"); } exports.default = insertWrapDetails;