Cleanup more Codeclimate issues (#267)

* Cleanup more Codeclimate issues

* Cleanup unused imports
This commit is contained in:
Jaco Greeff
2018-12-08 14:34:36 +01:00
committed by GitHub
parent 1d8106bb2d
commit fbd6c1e9bf
8 changed files with 84 additions and 93 deletions
+3 -5
View File
@@ -35,11 +35,9 @@ export default function u8aToU8a (value?: Array<number> | Buffer | Uint8Array |
}
if (isString(value)) {
if (isHex(value)) {
return hexToU8a(value);
}
return stringToU8a(value);
return isHex(value)
? hexToU8a(value)
: stringToU8a(value);
}
if (Array.isArray(value)) {