mirror of https://github.com/lukechilds/bip39.git
junderw
6 years ago
9 changed files with 204 additions and 63 deletions
@ -0,0 +1,51 @@ |
|||
"use strict"; |
|||
Object.defineProperty(exports, "__esModule", { value: true }); |
|||
// browserify by default only pulls in files that are hard coded in requires
|
|||
// In order of last to first in this file, the default wordlist will be chosen
|
|||
// based on what is present. (Bundles may remove wordlists they don't need)
|
|||
const wordlists = {}; |
|||
exports.wordlists = wordlists; |
|||
let _default; |
|||
exports._default = _default; |
|||
try { |
|||
exports._default = _default = require('./wordlists/chinese_simplified.json'); |
|||
wordlists.chinese_simplified = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/chinese_traditional.json'); |
|||
wordlists.chinese_traditional = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/korean.json'); |
|||
wordlists.korean = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/french.json'); |
|||
wordlists.french = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/italian.json'); |
|||
wordlists.italian = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/spanish.json'); |
|||
wordlists.spanish = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/japanese.json'); |
|||
wordlists.japanese = _default; |
|||
wordlists.JA = _default; |
|||
} |
|||
catch (err) { } |
|||
try { |
|||
exports._default = _default = require('./wordlists/english.json'); |
|||
wordlists.english = _default; |
|||
wordlists.EN = _default; |
|||
} |
|||
catch (err) { } |
@ -0,0 +1,42 @@ |
|||
// browserify by default only pulls in files that are hard coded in requires
|
|||
// In order of last to first in this file, the default wordlist will be chosen
|
|||
// based on what is present. (Bundles may remove wordlists they don't need)
|
|||
const wordlists: { [index: string]: string[] } = {}; |
|||
let _default: string[] | undefined; |
|||
try { |
|||
_default = require('./wordlists/chinese_simplified.json'); |
|||
wordlists.chinese_simplified = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/chinese_traditional.json'); |
|||
wordlists.chinese_traditional = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/korean.json'); |
|||
wordlists.korean = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/french.json'); |
|||
wordlists.french = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/italian.json'); |
|||
wordlists.italian = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/spanish.json'); |
|||
wordlists.spanish = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/japanese.json'); |
|||
wordlists.japanese = _default as string[]; |
|||
wordlists.JA = _default as string[]; |
|||
} catch (err) {} |
|||
try { |
|||
_default = require('./wordlists/english.json'); |
|||
wordlists.english = _default as string[]; |
|||
wordlists.EN = _default as string[]; |
|||
} catch (err) {} |
|||
|
|||
// Last one to overwrite wordlist gets to be default.
|
|||
export { wordlists, _default }; |
@ -0,0 +1,5 @@ |
|||
declare const wordlists: { |
|||
[index: string]: string[]; |
|||
}; |
|||
declare let _default: string[] | undefined; |
|||
export { wordlists, _default }; |
@ -0,0 +1,5 @@ |
|||
declare const wordlists: { |
|||
[index: string]: string[]; |
|||
}; |
|||
declare let _default: string[] | undefined; |
|||
export { wordlists, _default }; |
Loading…
Reference in new issue