foremark
Version:
A technology for writing semi-plain text documents that extends upon the concept of Markdeep.
19 lines • 547 B
JavaScript
// Provides a type for describing a set of strings.
Object.defineProperty(exports, "__esModule", { value: true });
function patternMatches(text, pat, options) {
if (pat instanceof RegExp) {
return pat.test(text);
}
else if (typeof pat === 'function') {
return pat(text, options);
}
else if (typeof pat === 'string') {
return pat === text;
}
else {
throw new Error("Invalid pattern type");
}
}
exports.patternMatches = patternMatches;
//# sourceMappingURL=pattern.js.map
;