Node js check if a var is a function

node.js

Solution

if (typeof variable === 'function') {
    // do something
}

Problem

Possible Duplicate: How can I check if a javascript variable is function type? How i check if a variable is a function for Array exist `Array.isArray()` but `Function.isFunction` dos'nt exist

Original source

Related problems