UNPKG

1.12 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../source/isValidNumberForRegion_.js"],"names":["isValidNumberForRegion","input","country","options","metadata"],"mappings":";;;;;;;AAAA;;;;AAEA;;;;;AAKe,SAASA,sBAAT,CAAgCC,KAAhC,EAAuCC,OAAvC,EAAgDC,OAAhD,EAAyDC,QAAzD,EAAmE;AACjF;AACA;AACAD,EAAAA,OAAO,GAAGA,OAAO,IAAI,EAArB;AACA,SAAOF,KAAK,CAACC,OAAN,KAAkBA,OAAlB,IAA6B,2BAAcD,KAAd,EAAqBE,OAArB,EAA8BC,QAA9B,CAApC;AACA","sourcesContent":["import isValidNumber from './validate_'\r\n\r\n/**\r\n * Checks if a given phone number is valid within a given region.\r\n * Is just an alias for `phoneNumber.isValid() && phoneNumber.country === country`.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\r\n */\r\nexport default function isValidNumberForRegion(input, country, options, metadata) {\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\toptions = options || {}\r\n\treturn input.country === country && isValidNumber(input, options, metadata)\r\n}"],"file":"isValidNumberForRegion_.js"}
\No newline at end of file