diff --git a/index.js b/index.js index d5cf324..712ce94 100644 --- a/index.js +++ b/index.js @@ -19,14 +19,17 @@ const helpSections = [ }, { name: 'lowercase', + alias: 'l', description: 'Output in lowercase.' }, { name: 'no-suffix', + alias: 'm', description: "Don't add a suffix." }, { name: 'hostname', + alias: 'h', description: 'Output a sensible hostname.' } ] @@ -66,7 +69,7 @@ const options = commandLineArgs(commandLineOptionDefinitions) if (options.help) { console.log(usage) } else { - var name = nsaname.getNSAName( + let name = nsaname.getNSAName( !(options.hostname || options['no-suffix']), options.hostname ? '-' : '') if (options.hostname) { diff --git a/lib/nsaname.js b/lib/nsaname.js index 109687a..0274b59 100644 --- a/lib/nsaname.js +++ b/lib/nsaname.js @@ -320,7 +320,7 @@ const suffixes = [ * @return {string} */ function getNSAName (suffix, separator) { - var nsaname = first[Math.floor(Math.random() * first.length)] + + let nsaname = first[Math.floor(Math.random() * first.length)] + separator + second[Math.floor(Math.random() * second.length)] if (suffix) { diff --git a/package.json b/package.json index eca5bec..46d7e4b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nsaname", - "version": "1.0.10", + "version": "1.0.11", "description": "Like petname, but for naming secret projects and tools.", "main": "index.js", "author": "Ricardo Banffy ",