X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fis-function%2Findex.js;fp=node_modules%2Fis-function%2Findex.js;h=bae218313767bfb525af88d231e0d1c5448a69ea;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/is-function/index.js b/node_modules/is-function/index.js new file mode 100644 index 000000000..bae218313 --- /dev/null +++ b/node_modules/is-function/index.js @@ -0,0 +1,15 @@ +module.exports = isFunction + +var toString = Object.prototype.toString + +function isFunction (fn) { + var string = toString.call(fn) + return string === '[object Function]' || + (typeof fn === 'function' && string !== '[object RegExp]') || + (typeof window !== 'undefined' && + // IE8 and below + (fn === window.setTimeout || + fn === window.alert || + fn === window.confirm || + fn === window.prompt)) +};