Adjust encoder/decoder fallbacks (#750)

* Adjust encoder/decoder fallbacks

* Dep-dup is functions

* Complexity cleanups
This commit is contained in:
Jaco Greeff
2020-11-08 11:20:22 +01:00
committed by GitHub
parent e1aa096cef
commit c67c1966d7
18 changed files with 118 additions and 78 deletions
+1 -1
View File
@@ -4,5 +4,5 @@
import Fallback from './fallback';
export default typeof TextDecoder === 'undefined'
? Fallback
? Fallback as unknown as typeof TextDecoder
: TextDecoder;
+1
View File
@@ -1,6 +1,7 @@
// Copyright 2017-2020 @polkadot/x-textencoder authors & contributors
// SPDX-License-Identifier: Apache-2.0
// This is very limited, only handling Ascii values
export default class TextDecoder {
// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-useless-constructor
constructor (_: 'utf-8') {