Files
cdek-maps/parent_dir/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js
zznty 4146027cb7 1
2024-05-30 16:04:19 +07:00

12 lines
456 B
JavaScript

/**
* Checks whether the entire input sequence can be matched
* against the regular expression.
* @return {boolean}
*/
export default function matchesEntirely(text, regular_expression) {
// If assigning the `''` default value is moved to the arguments above,
// code coverage would decrease for some weird reason.
text = text || '';
return new RegExp('^(?:' + regular_expression + ')$').test(text);
}
//# sourceMappingURL=matchesEntirely.js.map