michangarrito/apps/backend/node_modules/libphonenumber-js/source/helpers/matchesEntirely.js
rckrdmrd 97f407c661 [MIGRATION-V2] feat: Migrar michangarrito a estructura v2
- Prefijo v2: MCH
- TRACEABILITY-MASTER.yml creado
- Listo para integracion como submodulo

Workspace: v2.0.0 | SIMCO: v4.0.0
2026-01-10 11:28:54 -06:00

11 lines
433 B
JavaScript

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