Small cleanups, u8aConcat optimization (#607)
* Small cleanups, u8aConcat oprimizations * Cleanup * Pre-allocate arrays * Don't recreate PREFIX
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user