From c95f7cf0cde888279e4e5e74dd12ad321807c949 Mon Sep 17 00:00:00 2001 From: Jandalf Date: Sun, 19 Jul 2015 19:56:58 +0200 Subject: [PATCH 1/3] Add dotName filter replace firstname and all middle names with a dot notation --- README.md | 11 +++++++ src/_filter/string/dot-name.js | 33 +++++++++++++++++++++ src/filters.js | 1 + test/spec/filter/string/dot-name.js | 46 +++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 src/_filter/string/dot-name.js create mode 100644 test/spec/filter/string/dot-name.js diff --git a/README.md b/README.md index b8a5f8a..d57204a 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ - [uriEncode](#uriencode) - [uriComponentEncode](#uricomponentencode) - [wrap](#wrap) + - [dotName](#dotName) - [Math](#math) - [min](#min) - [max](#max) @@ -1062,6 +1063,16 @@ usage: ```string | wrap: string: string[optional]``` /foo/ {{foo}} ``` +###dotName +Replace firstname and all middle names with a dot notation
+usage: ```string | dotName``` +```html +

{{ 'Gale Lewin' | dotName }}

+

{{ 'Sonny Teresa Hopson' | dotName }}

+