UNPKG

@jharrilim/madlibs

Version:

randomized madlibs templating engine

7 lines 398 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mapWeave = (mapArg = a => a, mapTemplate = t => t) => (templateStrings, ...templateStringArguments) => templateStrings .flatMap((v, i) => i < templateStringArguments.length ? [mapTemplate(v, i), mapArg(templateStringArguments[i], i)] : [mapTemplate(v, i)]); //# sourceMappingURL=map-weave.js.map