UNPKG
to-dot-case
Version:
latest (1.0.0)
1.0.0
0.1.3
0.1.2
0.0.2
Convert a string to dot case.
github.com/ianstormtaylor/to-dot-case
ianstormtaylor/to-dot-case
to-dot-case
/
index.js
20 lines
(14 loc)
•
255 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var
space =
require
(
'to-space-case'
)
/** * Export. */
module.exports = toDotCase
/** * Convert a `string` to slug case. * *
@param
{String} string *
@return
{String} */
function
toDotCase
(
string
)
{
return
space
(
string
).
replace
(/\s/g,
'.'
) }