Spaces:
Build error
Build error
File size: 839 Bytes
f316cce | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cleanAttribute = cleanAttribute;
exports.tryDecodeURIComponent = tryDecodeURIComponent;
exports.toAsyncGenerator = toAsyncGenerator;
exports.toGenerator = toGenerator;
const civkit_1 = require("civkit");
function cleanAttribute(attribute) {
return attribute ? attribute.replace(/(\n+\s*)+/g, '\n') : '';
}
function tryDecodeURIComponent(input) {
try {
return decodeURIComponent(input);
}
catch (err) {
if (URL.canParse(input, 'http://localhost:3000')) {
return input;
}
throw new civkit_1.ParamValidationError(`Invalid URIComponent: ${input}`);
}
}
async function* toAsyncGenerator(val) {
yield val;
}
async function* toGenerator(val) {
yield val;
}
//# sourceMappingURL=misc.js.map |