UNPKG
fastify-plugin
Version:
latest (5.1.0)
next (5.0.0)
5.1.0
5.0.1
5.0.0
5.0.0-pre.fv5.1
4.5.1
4.5.0
4.4.0
4.3.0
4.2.1
4.2.0
4.1.0
4.0.0
3.0.1
3.0.0
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.0
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
1.6.1
1.6.0
1.5.0
1.4.0
1.3.0
1.2.1
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
Plugin helper for Fastify
github.com/fastify/fastify-plugin
fastify/fastify-plugin
fastify-plugin
/
lib
/
toCamelCase.js
11 lines
(9 loc)
•
222 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
'use strict'
module
.
exports
=
function
toCamelCase
(
name
) {
if
(name[
0
] ===
'@'
) { name = name.
slice
(
1
).
replace
(
'/'
,
'-'
) }
return
name.
replace
(
/-(.)/g
,
function
(
match, g1
) {
return
g1.
toUpperCase
() }) }