Skip to content

Commit

Permalink
clean up parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lau Skeeter committed May 20, 2018
1 parent 6b5c731 commit a66c980
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/make-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const colors = require('get-image-colors');

const randomArrKey = items => items[Math.floor(Math.random() * items.length)];

const txtToArr = txt => txt.split('\n').filter(_ => _ != '');

const fiddle = color => {
const fuzzyness = 100;
[0, 1, 2].forEach(i => {
Expand All @@ -20,12 +22,11 @@ const getEdibleName = edible =>

const edibles = fs
.readFileSync('./assets/words/edible-emoji.txt', 'utf8')
.split('\n');
.txtToArr();

const adjs = fs
.readFileSync('./assets/words/adjectives.txt', 'utf8')
.split('\n')
.filter(_ => _ != '');
.txtToArr();

const make = async () => {
const name = [];
Expand Down

0 comments on commit a66c980

Please sign in to comment.