Small cleanups, u8aConcat optimization (#607)

* Small cleanups, u8aConcat oprimizations

* Cleanup

* Pre-allocate arrays

* Don't recreate PREFIX
This commit is contained in:
Jaco Greeff
2020-06-01 09:29:44 +02:00
committed by GitHub
parent 0f6e996799
commit d4491aeb7f
12 changed files with 39 additions and 31 deletions
+3 -2
View File
@@ -2,6 +2,8 @@
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
type FnType = (...params: unknown[]) => unknown;
/**
* @name isFunction
* @summary Tests for a `function`.
@@ -16,7 +18,6 @@
* isFunction(() => false); // => true
* ```
*/
// eslint-disable-next-line @typescript-eslint/ban-types
export default function isFunction (value: unknown): value is Function {
export default function isFunction (value: unknown): value is FnType {
return typeof value === 'function';
}