Changed validMnemonic to isValidMnemonic.

This commit is contained in:
ricmoo 2017-04-04 17:18:23 -04:00
parent 807b27048b
commit 0b8cf42fcf

@ -238,11 +238,12 @@ function entropyToMnemonic(entropy) {
return words.join(' ');
}
function validMnemonic(mnemonic) {
function isValidMnemonic(mnemonic) {
try {
mnemonicToEntropy(mnemonic);
return true;
} catch (error) { }
return false;
}
@ -254,5 +255,5 @@ module.exports = {
entropyToMnemonic: entropyToMnemonic,
mnemonicToSeed: mnemonicToSeed,
validMnemonic: validMnemonic,
isValidMnemonic: isValidMnemonic,
};