UNPKG

842 BSource Map (JSON)View Raw
1{"version":3,"sources":["../../source/helpers/matchesEntirely.js"],"names":["matchesEntirely","text","regular_expression","RegExp","test"],"mappings":";;;;;;;AAAA;;;;;AAKe,SAASA,eAAT,CAAyBC,IAAzB,EAA+BC,kBAA/B,EAAmD;AACjE;AACA;AACAD,EAAAA,IAAI,GAAGA,IAAI,IAAI,EAAf;AACA,SAAO,IAAIE,MAAJ,CAAW,SAASD,kBAAT,GAA8B,IAAzC,EAA+CE,IAA/C,CAAoDH,IAApD,CAAP;AACA","sourcesContent":["/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\r\nexport default function matchesEntirely(text, regular_expression) {\r\n\t// If assigning the `''` default value is moved to the arguments above,\r\n\t// code coverage would decrease for some weird reason.\r\n\ttext = text || ''\r\n\treturn new RegExp('^(?:' + regular_expression + ')$').test(text)\r\n}"],"file":"matchesEntirely.js"}
\No newline at end of file