Added eslint and fixed an issue from #158
This commit is contained in:
@@ -2,13 +2,11 @@ var fs = require('fs');
|
||||
|
||||
var DictionaryGenerator = function(options) {
|
||||
//Options
|
||||
if (!options)
|
||||
return done(Error('No options passed to generator'));
|
||||
if (!options.path)
|
||||
return done(Error('No dictionary path specified in options'));
|
||||
|
||||
if (!options) throw Error('No options passed to generator');
|
||||
if (!options.path) throw Error('No dictionary path specified in options');
|
||||
|
||||
//Load dictionary
|
||||
fs.readFile(options.path, 'utf8', (err,data) => {
|
||||
fs.readFile(options.path, 'utf8', (err, data) => {
|
||||
if (err) throw err;
|
||||
this.dictionary = data.split(/[\n\r]+/);
|
||||
});
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// Draws inspiration from pwgen and http://tools.arantius.com/password
|
||||
var PhoneticKeyGenerator = function(options) {
|
||||
var PhoneticKeyGenerator = function() {
|
||||
// No options
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user