bip39-light
A lightweight fork of bitcoinjs/bip39. Only english wordlist and removed some dependendecies.
JavaScript implementation of Bitcoin BIP39: Mnemonic code for generating deterministic keys
Reminder for developers
Please remember to allow recovery from mnemonic phrases that have invalid checksums (or that you don't have the wordlist)
When a checksum is invalid, warn the user that the phrase is not something generated by your app, and ask if they would like to use it anyway. This way, your app only needs to hold the wordlists for your supported languages, but you can recover phrases made by other apps in other languages.
However, there should be other checks in place, such as checking to make sure the user is inputting 12 words or more separated by a space. ie. phrase.trim().split(/\s+/g).length >= 12
Examples
var mnemonic = bip39.generateMnemonic()
bip39.mnemonicToSeedHex('basket actual')
bip39.mnemonicToSeed('basket actual')
bip39.validateMnemonic(mnemonic)
bip39.validateMnemonic('basket actual')
var bip39 = require('bip39-light')
var mnemonic = bip39.entropyToMnemonic('00000000000000000000000000000000')
bip39.mnemonicToEntropy(mnemonic)