UNPKG
slush-angular2
Version:
latest (1.1.0)
1.1.0
1.0.9
1.0.0
0.8.3
0.8.2
0.8.0
0.7.0
0.6.7
0.6.6
0.6.5
0.6.3
0.6.2
0.6.1
0.6.0
0.5.1
0.5.0
0.4.13
0.4.12
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.9
0.3.8
0.3.7
0.3.6
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.22
0.2.21
0.2.20
0.2.19
0.2.18
0.2.17
0.2.16
0.2.15
0.2.14
0.2.13
0.2.12
0.2.11
0.2.2
0.2.1
0.2.0
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
Slush Generator For Angular2
github.com/ryanmetin/slush-angular2
ryanmetin/slush-angular2
slush-angular2
/
templates
/
app
/
src
/
example
/
pipe
/
capitalize.pipe.ts
11 lines
(9 loc)
•
266 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
{
Pipe
,
PipeTransform
}
from
'@angular/core'
;
@Pipe
({
name
:
'capitalize'
})
export
class
CapitalizePipe
implements
PipeTransform
{
transform
(
value
:
string
):
any
{
return
value.
toLowerCase
().
replace
(
/\b\w/g
,
match
=>
match.
toUpperCase
()); } }