@altimho/ruphoner

1.0.3 • Public • Published

Ruphoner

Ruphoner is AngularJS filter made to uniform russian phone numbers formatting.

If input string is valid russian phone number (11-digits, begins with +7, 7 or 8) it will be transformed to +7 987 654-32-10 form (+7 3–5 digits code grouped number).

Using

Include altimho.ruphoner module as your app dependency

angular
  .module('example_app', [ 'altimho.ruphoner' ]);

Use filter in templates:

<span ng-bind="user.phone | ruphoner"></span>

or in code:

$filter('ruphoner')(input)

Package Sidebar

Install

npm i @altimho/ruphoner

Weekly Downloads

1

Version

1.0.3

License

MIT

Last publish

Collaborators

  • altimho