-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
2,065 additions
and
2,944 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env node | ||
export {}; | ||
//# sourceMappingURL=cli.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/usr/bin/env node | ||
'use strict' | ||
const metal = require('./') | ||
|
||
console.log(metal()) | ||
import metal from './index.js'; | ||
console.log(metal()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env node | ||
import metal from './index.js' | ||
|
||
console.log(metal()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
interface Options { | ||
fragment?: 'start' | 'end'; | ||
} | ||
export default function (options?: Options): string; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
'use strict' | ||
const words = require('./words.json') | ||
const sample = require('lodash.sample') | ||
|
||
module.exports = function (options = {}) { | ||
if (!options.fragment) { | ||
return `${sample(words.start)} ${sample(words.end)}` | ||
} | ||
return sample(words[options.fragment]) | ||
import words from './words.js'; | ||
import sample from 'lodash.sample'; | ||
export default function (options = {}) { | ||
if (options.fragment == null) { | ||
return `${sample(words.start)} ${sample(words.end)}`; | ||
} | ||
return sample(words[options.fragment]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import words from './words.js' | ||
import sample from 'lodash.sample' | ||
|
||
interface Options { | ||
fragment?: 'start' | 'end' | ||
} | ||
|
||
export default function (options: Options = {}): string { | ||
if (options.fragment == null) { | ||
return `${sample(words.start) as string} ${sample(words.end) as string}` | ||
} | ||
return sample(words[options.fragment]) as string | ||
} |
Oops, something went wrong.