UNPKG
generator-njsm
Version:
latest (5.1.2)
5.1.2
5.1.1
4.0.2
4.0.0
3.5.0
3.2.0
3.0.1
1.2.0
1.1.0
1.0.0
Scaffold out a node module
github.com/uschek/generator-njsm
uschek/generator-njsm
generator-njsm
/
app
/
utils.js
7 lines
(5 loc)
•
245 B
JavaScript
View Raw
1
2
3
4
5
6
7
'use strict'
;
const
_s =
require
(
'underscore.string'
);
const
isScoped =
require
(
'is-scoped'
);
exports
.
repoName
=
name
=>
isScoped
(name) ? name.
split
(
'/'
)[
1
] : name;
exports
.
slugifyPackageName
=
name
=>
isScoped
(name) ? name : _s.
slugify
(name);