Skip to content

Commit dc6bdc8

Browse files
author
Kent C. Dodds
committed
add dependencies and create module πŸ“
1 parent 3c28df8 commit dc6bdc8

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

β€Ž.gitignoreβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

β€Žpackage.jsonβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@
1919
"bugs": {
2020
"url": "https://github.com/kentcdodds/starwars-names/issues"
2121
},
22-
"homepage": "https://github.com/kentcdodds/starwars-names#readme"
22+
"homepage": "https://github.com/kentcdodds/starwars-names#readme",
23+
"dependencies": {
24+
"unique-random-array": "1.0.0"
25+
}
2326
}

β€Žsrc/index.jsβ€Ž

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
var uniqueRandomArray = require('unique-random-array');
4+
var starWarsNames = require('./starwars-names.json');
5+
6+
module.exports = {
7+
all: starWarsNames,
8+
random: uniqueRandomArray(starWarsNames)
9+
};

0 commit comments

Comments
Β (0)