UNPKG

295 BJavaScriptView Raw
1'use strict';
2
3module.exports = {
4 checkRegexes: (value, regexes) => {
5 const matched = regexes.reduce(
6 (alreadyFound, r) => alreadyFound || value.match(r),
7 null
8 );
9 return (matched !== null ? matched[1] : null);
10 },
11
12 areIDsSame: (a, b) => {
13 return a === b;
14 }
15};