@nodesecure/contact
Version:
Utilities to extract/fetch data on NPM contacts (author, maintainers ..)
11 lines • 346 B
JavaScript
export function parseRegExp(input) {
const match = input.match(/(\/+)(.+)\1([a-z]*)/i);
if (!match) {
return null;
}
const validFlags = Array.from(new Set(match[3]))
.filter((flag) => "gimsuy".includes(flag))
.join("");
return new RegExp(match[2], validFlags);
}
//# sourceMappingURL=parseRegexp.js.map