Skip to content

Syonet/name-beautifier

Repository files navigation

nameBeautifier

Beautifier for person names for Angular.js

Build Status Code Climate

{{ user.name | beautifyName }}
<!--
input: JOAO DA SILVA
output: Joao da Silva
-->

Installation

Use Bower to grab the package:

bower install syonet.nameBeautifier

Then, inject the module into your app:

angular.module( "app", [ "syonet.namebeautifier" ]);

Usage

nameBeautifier can be used in two forms in an Angular app: filter and service.

As a filter

Simply use the beautifyName filter:

{{ user.name | beautifyName }}
<!--
input: JOAO DA SILVA
output: Joao da Silva
-->

As a service

Inject the $nameBeautifier service into your controller/service:

.controller( "MyController", function ( $nameBeautifier, user ) {
    $nameBeautifier.beautify( user.name );
})

License

MIT

About

Beautifier for person names for Angular.js

Resources

Stars

Watchers

Forks

Packages

No packages published