检查是否为 function
值
isFn(function(){}); /// trueisFn(async function(){}); /// trueisFn(new Promise((resolve, reject) => resolve()); /// falseisFn({}); /// false Copy
isFn(function(){}); /// trueisFn(async function(){}); /// trueisFn(new Promise((resolve, reject) => resolve()); /// falseisFn({}); /// false
检查是否为 function