Tabnine Logo For Javascript
isFunction
Code IndexAdd Tabnine to your IDE (free)

How to use
isFunction
function
in
lodash

Best JavaScript code snippets using lodash.isFunction(Showing top 15 results out of 315)

origin: benjsicam/nodejs-graphql-microservices

async Mutation(resolve, root, args, context, info) {
  const mutation = info.schema.getMutationType().getFields()[info.fieldName]

  if (isFunction(mutation.authorize)) {
   await mutation.authorize(root, args, context, info)
  }

  return resolve(root, args, context, info)
 }
origin: ryrudnev/spa-react-redux-example

const checkMapData = (mapData) => {
 invariant(
  isFunction(mapData),
  'Expected mapData to be a function that returns a data to display in table.',
 );
 return mapData;
}
origin: manaflair/mylittledom

setDefault(callback) {

    if (!isFunction(callback))
      throw new Error(`Failed to execute 'setDefaultAction': Parameter 1 is not of type 'function'.`);

    this.default = callback;

  }
origin: tarkalabs/material-todo-jsc2016

function isEqualValue(value, other) {
 if (value === other) { return true; }

 var isImmutableDS = isEqualImmutableDS(value, other);
 if (isImmutableDS !== undefined) { return isImmutableDS; }

 return isEqual(value, other, (current, next) => {
  if (current === next) { return true; }

  if (isFunction(current) && isFunction(next)) {
   return current.toString() === next.toString();
  }

  return isEqualImmutableDS(current, next);
 });
}
origin: google/chatbase-node

test('logger factory functionality', t => {
 var inst = logger('test');
 t.true(isFunction(logger), 'The logger module should export a function');
 t.is(inst.name, 'debug',
  'Invoking the function should return an instance of the debug module');
 t.notThrows(() => logger(),
  'Should be able to create an instance of the logger without providing a namespace');
});
origin: mindjs/mindjs

/**
 *
 * @param {*} middlewareReceiver
 * @param {Function[]} middleware
 * @returns {Promise<*[]>}
 */
async function initMiddlewareOn(middlewareReceiver, middleware) {
 return Promise.all(
  toArray(middleware)
   .filter(mw => isFunction(mw))
   .map(mw => invokeOn(middlewareReceiver, 'use', mw))
 );
}
origin: erickjth/simple-command-bus

inflect(commandName, handler) {
    if (isFunction(handler[this.methodName]) === false) {
      InvalidHandlerMethodException.forMethod(this.methodName);
    }

    return this.methodName;
  }
origin: wirecardBrasil/moip-sdk-node

const looper = (result, resource, authObject) => reduce(resource, (result, func, key) => {
 result[key] = isFunction(func) ? binder(func, authObject) : looper(result, func, authObject)
 return result
}, {})
origin: mindjs/mindjs

/**
 * Checks if provided function is an AsyncFunction
 * @param {Function} fn
 * @returns {boolean}
 */
function isAsyncFunction(fn) {
 if (!isFunction(fn)) {
  return false;
 }

 return fn.constructor.name === 'AsyncFunction';
}
origin: mindjs/mindjs

/**
 *
 * @param {Function} fn
 * @returns {boolean}
 */
function isArrowFunction(fn) {
 return isFunction(fn) && !fn.prototype;
}
origin: benjsicam/nodejs-graphql-microservices

async Query(resolve, root, args, context, info) {
  const query = info.schema.getQueryType().getFields()[info.fieldName]

  if (isFunction(query.authorize)) {
   await query.authorize(root, args, context, info)
  }

  return resolve(root, args, context, info)
 }
origin: mindjs/mindjs

/**
 * Checks if provided function is an AsyncFunction
 * @param {Function} fn
 * @returns {boolean}
 */
function isAsyncFunction(fn) {
 if (!isFunction(fn)) {
  return false;
 }

 return fn.constructor.name === 'AsyncFunction';
}
origin: ryrudnev/spa-react-redux-example

const checkActionCreator = (actionCreator) => {
 invariant(
  isFunction(actionCreator),
  'Expected actionCreator to be a function that returns an API action.',
 );
 return actionCreator;
}
origin: benjsicam/nodejs-graphql-microservices

async Mutation(resolve, root, args, context, info) {
  const mutation = info.schema.getMutationType().getFields()[info.fieldName]

  if (isFunction(mutation.authorize)) {
   await mutation.authorize(root, args, context, info)
  }

  return resolve(root, args, context, info)
 }
origin: benjsicam/nodejs-graphql-microservices

async Query(resolve, root, args, context, info) {
  const query = info.schema.getQueryType().getFields()[info.fieldName]

  if (isFunction(query.authorize)) {
   await query.authorize(root, args, context, info)
  }

  return resolve(root, args, context, info)
 }
lodash(npm)isFunction

Most used lodash functions

  • LoDashStatic.map
    Creates an array of values by running each element in collection through iteratee. The iteratee is
  • LoDashStatic.isEmpty
    Checks if value is empty. A value is considered empty unless it’s an arguments object, array, string
  • LoDashStatic.forEach
    Iterates over elements of collection invoking iteratee for each element. The iteratee is invoked wit
  • LoDashStatic.find
    Iterates over elements of collection, returning the first element predicate returns truthy for.
  • LoDashStatic.pick
    Creates an object composed of the picked `object` properties.
  • LoDashStatic.get,
  • LoDashStatic.isArray,
  • LoDashStatic.filter,
  • LoDashStatic.merge,
  • LoDashStatic.isString,
  • LoDashStatic.isFunction,
  • LoDashStatic.assign,
  • LoDashStatic.extend,
  • LoDashStatic.includes,
  • LoDashStatic.keys,
  • LoDashStatic.cloneDeep,
  • LoDashStatic.uniq,
  • LoDashStatic.isObject,
  • LoDashStatic.omit

Popular in JavaScript

  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • node-fetch
    A light-weight module that brings window.fetch to node.js
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • mongodb
    The official MongoDB driver for Node.js
  • body-parser
    Node.js body parsing middleware
  • colors
    get colors in your node.js console
  • fs-extra
    fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • minimist
    parse argument options
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now