From 64ced4d33c18fcf26ed9a9f9c73950737fc180d3 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Thu, 29 Mar 2018 11:56:13 +0700 Subject: [PATCH] Simplify `isFunctionOfType` https://github.com/sindresorhus/is/commit/ef85a5173deec78af38608a569e0a5ce7dd5c5c9#r28310156 --- source/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/index.ts b/source/index.ts index 540dd06..39bb591 100644 --- a/source/index.ts +++ b/source/index.ts @@ -133,7 +133,7 @@ namespace is { // tslint:disable-line:no-namespace export const promise = (value: any) => nativePromise(value) || hasPromiseAPI(value); - const isFunctionOfType = (type: TypeName) => (value: any) => isObjectOfType(type)(value); + const isFunctionOfType = (type: TypeName) => isObjectOfType(type); export const generatorFunction = isFunctionOfType(TypeName.GeneratorFunction); export const asyncFunction = isFunctionOfType(TypeName.AsyncFunction); export const boundFunction = (value: any) => function_(value) && !value.hasOwnProperty('prototype');