web-audio-test-api
Version:
Web Audio API test library for CI
18 lines (17 loc) • 387 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = format;
function format(text) {
text = text.trim();
text = text.replace(/\$a (\w)/g, function (_, a) {
if (/[aiueo]/i.test(a)) {
return "an " + a;
}
return "a " + a;
});
text = text.replace(/{{(\w+)}}/g, "$1");
text = text.replace(/^ +/gm, "");
return text;
}