* Composes a spec for the currently selected variant. * @protected * @return {object}
()
| 193 | * @return {object} |
| 194 | */ |
| 195 | _getVariant () { |
| 196 | const variant = this.getSettingValue('variant') |
| 197 | const { alphabet, codeAlphabet } = |
| 198 | variantSpecs.find(spec => spec.name === variant) |
| 199 | |
| 200 | const codeLength = codeAlphabet.length / alphabet.length |
| 201 | const codes = StringUtil.chunk(codeAlphabet, codeLength) |
| 202 | |
| 203 | return { alphabet, codes, codeLength } |
| 204 | } |
| 205 | } |
no test coverage detected