code: function isNativeFunction(f) {
    if ((typeof f) !== 'function') {
      return false;
    }
    var exp = /^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i;
    return exp.exec(Function.prototype.toString.call(f)) != null;
  }
docs: Check if the given function is a native function