Codota Logo For Javascript
isFunction
Code IndexAdd Codota 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

  • readable-stream
    Streams3, a user-land copy of the stream library from Node.js
  • http
  • 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.
  • fs
  • superagent
    elegant & feature rich browser / node HTTP with a fluent API
  • express
    Fast, unopinionated, minimalist web framework
  • chalk
    Terminal string styling done right
  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • path
  • Top plugins for WebStorm
    The challenge is finding the best plugins for JavaScript development on Intellij IDEs. Who wants to sit there and go over hundreds of plugins to pick the best?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJavascript Code Index
Get Codota for your IDE now