How to use the ramda-adjunct.isFunction function in ramda-adjunct

To help you get started, we’ve selected a few ramda-adjunct examples, based on popular ways it is used in public projects.

github char0n / page-objects / test / e2e / support / WebElementEnhanced.js View on Github external
get(target, propKey) {
    // calling methods on WebElementEnhanced API
    if (isFunction(target[propKey])) {
      return async function (...args) {
        return target[propKey](...args);
      };
    }

    // calling methods on the original WebElement API
    return async function (...args) {
      return target.webElement[propKey](...args);
    };
  },
};
github DFEAGILEDEVOPS / MTC / functions-app / report-psychometrician / spec / detections / detect-check-took-too-long.spec.js View on Github external
it('exports a function', () => {
    expect(RA.isFunction(detectCheckTookTooLong)).toBe(true)
  })
github char0n / monad-t / src / FlutureTMonetEither / index.js View on Github external
return this[chain]((val) => {
    if (!predicate(val)) {
      if (isFunction(fnOrValue)) {
        return this.constructor.fromEither(Either.Left(fnOrValue(val)));
      }
      return this.constructor.fromEither(Either.Left(fnOrValue));
    }
    return this.constructor.fromValue(val);
  });
};
github ahdinosaur / gyne / util / populateFields.js View on Github external
reduce((sofar, [nextKey, nextPopulator]) => {
      const value = isFunction(nextPopulator)
        ? nextPopulator(object)
        : populateFields(nextPopulator, object)
      sofar[nextKey] = value
      return sofar
    }, {}),
    filter(isNil)