UNPKG

libphonenumber-js

Version:

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript

10 lines (9 loc) 292 B
import PhoneNumberMatcher from './PhoneNumberMatcher' export default function findNumbers(text, options, metadata) { const matcher = new PhoneNumberMatcher(text, options, metadata) const results = [] while (matcher.hasNext()) { results.push(matcher.next()) } return results }