1 | 'use strict'
|
2 |
|
3 | var metadata = require('../metadata.mobile.json')
|
4 | var core = require('../core/index.commonjs')
|
5 |
|
6 | function call(func, _arguments) {
|
7 | var args = Array.prototype.slice.call(_arguments)
|
8 | args.push(metadata)
|
9 | return func.apply(this, args)
|
10 | }
|
11 |
|
12 | function parsePhoneNumberFromString() {
|
13 | return call(core.parsePhoneNumberFromString, arguments)
|
14 | }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | exports = module.exports = parsePhoneNumberFromString
|
21 | exports['default'] = parsePhoneNumberFromString
|
22 |
|
23 | exports.ParseError = core.ParseError
|
24 |
|
25 | function parsePhoneNumberWithError() {
|
26 | return call(core.parsePhoneNumberWithError, arguments)
|
27 | }
|
28 |
|
29 |
|
30 | exports.parsePhoneNumber = parsePhoneNumberWithError
|
31 | exports.parsePhoneNumberWithError = parsePhoneNumberWithError
|
32 |
|
33 |
|
34 |
|
35 | exports.parsePhoneNumberFromString = parsePhoneNumberFromString
|
36 |
|
37 | exports.findNumbers = function findNumbers() {
|
38 | return call(core.findNumbers, arguments)
|
39 | }
|
40 |
|
41 | exports.searchNumbers = function searchNumbers() {
|
42 | return call(core.searchNumbers, arguments)
|
43 | }
|
44 |
|
45 | exports.findPhoneNumbersInText = function findPhoneNumbersInText() {
|
46 | return call(core.findPhoneNumbersInText, arguments)
|
47 | }
|
48 |
|
49 | exports.searchPhoneNumbersInText = function searchPhoneNumbersInText() {
|
50 | return call(core.searchPhoneNumbersInText, arguments)
|
51 | }
|
52 |
|
53 | exports.PhoneNumberMatcher = function PhoneNumberMatcher(text, options) {
|
54 | return core.PhoneNumberMatcher.call(this, text, options, metadata)
|
55 | }
|
56 | exports.PhoneNumberMatcher.prototype = Object.create(core.PhoneNumberMatcher.prototype, {})
|
57 | exports.PhoneNumberMatcher.prototype.constructor = exports.PhoneNumberMatcher
|
58 |
|
59 | exports.AsYouType = function AsYouType(country) {
|
60 | return core.AsYouType.call(this, country, metadata)
|
61 | }
|
62 | exports.AsYouType.prototype = Object.create(core.AsYouType.prototype, {})
|
63 | exports.AsYouType.prototype.constructor = exports.AsYouType
|
64 |
|
65 | exports.isSupportedCountry = function isSupportedCountry(country) {
|
66 | return call(core.isSupportedCountry, arguments)
|
67 | }
|
68 |
|
69 | exports.getCountries = function getCountries() {
|
70 | return call(core.getCountries, arguments)
|
71 | }
|
72 |
|
73 | exports.getCountryCallingCode = function getCountryCallingCode() {
|
74 | return call(core.getCountryCallingCode, arguments)
|
75 | }
|
76 |
|
77 | exports.getExtPrefix = function getExtPrefix(country) {
|
78 | return call(core.getExtPrefix, arguments)
|
79 | }
|
80 |
|
81 | exports.getExampleNumber = function getExampleNumber() {
|
82 | return call(core.getExampleNumber, arguments)
|
83 | }
|
84 |
|
85 | exports.formatIncompletePhoneNumber = function formatIncompletePhoneNumber() {
|
86 | return call(core.formatIncompletePhoneNumber, arguments)
|
87 | }
|
88 |
|
89 | exports.parseIncompletePhoneNumber = core.parseIncompletePhoneNumber
|
90 | exports.parsePhoneNumberCharacter = core.parsePhoneNumberCharacter
|
91 | exports.parseDigits = core.parseDigits
|
92 | exports.DIGIT_PLACEHOLDER = core.DIGIT_PLACEHOLDER
|
93 |
|
94 | exports.parseRFC3966 = core.parseRFC3966
|
95 | exports.formatRFC3966 = core.formatRFC3966 |
\ | No newline at end of file |