diff --git a/README.md b/README.md index 41637d9..c0eb834 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -BIP39 -===== +# BIP39 [![Build Status](https://travis-ci.org/bitcoinjs/bip39.png?branch=master)](https://travis-ci.org/bitcoinjs/bip39) -[![Version](http://img.shields.io/npm/v/bip39.svg)](https://www.npmjs.org/package/bip39) +[![NPM](https://img.shields.io/npm/v/bip39.svg)](https://www.npmjs.org/package/bip39) + +[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard) + JavaScript implementation of [Bitcoin BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki): Mnemonic code for generating deterministic keys diff --git a/index.js b/index.js index 2faddb2..7ee6d50 100644 --- a/index.js +++ b/index.js @@ -55,7 +55,7 @@ function mnemonicToEntropy (mnemonic, wordlist) { var newChecksum = checksumBits(entropyBuffer) // recreate properly chunked and padded bits to get the properly padded checksum - var bits2 = (entropy + newChecksum).match(/(.{1,11})/g).map(function(index) { + var bits2 = (entropy + newChecksum).match(/(.{1,11})/g).map(function (index) { return lpad(index, '0', 11) }).join('') diff --git a/package.json b/package.json index aafe413..340d616 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "devDependencies": { "browserify": "^9.0.0", "mocha": "^2.2.0", - "mock-require": "^1.0.5" + "mock-require": "^1.0.5", + "standard": "*" } }