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
/
templates
/
index.js
10 lines
(7 loc)
•
218 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
'use strict'
;
module
.
exports
=
(
input, {postfix =
'rainbows'
} = {}
) =>
{
if
(
typeof
input !==
'string'
) {
throw
new
TypeError
(
`Expected a string, got
${
typeof
input}
`
); }
return
`
${input}
&
${postfix}
`
; };