-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcase.js
51 lines (50 loc) · 1.03 KB
/
case.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
const {
upper,
lower,
capital,
snake,
pascal,
camel,
kebab,
header,
constant,
title,
sentence,
flip,
random,
} = require('case')
module.exports.register = handlebars => {
handlebars.registerHelper('upper', function (str) {
return upper(str)
})
handlebars.registerHelper('lower', function (str) {
return lower(str)
})
handlebars.registerHelper('capital', function (str) {
return capital(str)
})
handlebars.registerHelper('snake', function (str) {
return snake(str)
})
handlebars.registerHelper('pascal', function (str) {
return pascal(str)
})
handlebars.registerHelper('camel', function (str) {
return camel(str)
})
handlebars.registerHelper('kebab', function (str) {
return kebab(str)
})
handlebars.registerHelper('header', function (str) {
return header(str)
})
handlebars.registerHelper('constant', function (str) {
return constant(str)
})
handlebars.registerHelper('title', function (str) {
return title(str)
})
handlebars.registerHelper('sentence', function (str) {
return sentence(str)
})
}