Skip to content

Commit d3e0730

Browse files
committed
added function to create word code directly from a hash value.
1 parent 292c9cc commit d3e0730

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/spaces/Space.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ class Space {
183183

184184
const hash = entryPoint.hash();
185185

186+
return Space.getWordCodingForHash(hash, words, lang);
187+
}
188+
189+
static getWordCodingForHash(hash: Hash, words=3, lang='en') {
190+
186191
let coder = WordCode.lang.get(lang);
187192

188193
if (coder === undefined) {

0 commit comments

Comments
 (0)