Skip to content

Commit

Permalink
libphonenumber: document how to bring your own (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianFrank authored Feb 25, 2020
1 parent 2d91989 commit 828846c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/phone-lib-addon.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ Under `dist/addons` directory, you can find:

- i18n all-in-one `cleave-phone.i18n.js` but with large size

- bring your own libphonenumber instance (reduces bundle size)

```JS
const AsYouTypeFormatter = require('google-libphonenumber').AsYouTypeFormatter;
window.Cleave = window.Cleave || {};
window.Cleave.AsYouTypeFormatter = AsYouTypeFormatter;
```

> You can find your country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) list.

### Simply HTML include
Expand Down

0 comments on commit 828846c

Please sign in to comment.