How to use the function function from is

Find comprehensive JavaScript is.function code examples handpicked from public code repositorys.

24
25
26
27
28
29
30
31
32
33
var isNumber = is.number;
var isObject = is.object;
var isString = is.string;
var isArray = is.array;
var isNull = is.null;
var isFunction = is.function;

function Fuzzer() { }

Fuzzer.prototype.generate = {};
fork icon557
star icon0
watch icon3

60
61
62
63
64
65
66
67
68
69

  return str
}

const handleSvg = (app, loaderCtx, $, elem, svgsConfig, svgo) => {
  const computeSrc = is.function(svgsConfig.computeSrc)
    ? svgsConfig.computeSrc
    : (svgsPath, attrs) => {
        return `~/${svgsPath}/${attrs.set}/${attrs.name}`
      }
fork icon4
star icon77
watch icon4

+ 3 other calls in file

53
54
55
56
57
58
59
60
61
62
exports.decrement = function(key, step, callback) {
  return xcre(this, OPCODE.DECREMENT, key, step, callback);
};

function xcre(mc, opcode, key, step, callback) {
  if (is.undef(step) || is.function(step)) {
    callback = step;
    step = 1;
  }
  let extras = step;
fork icon0
star icon10
watch icon12

+ 19 other calls in file

54
55
56
57
58
59
60
61
62
63

    //transform
    result.transform = is.function(item.transform) ? item.transform : function(value) { return value; };

    //validate
    result.validate = is.function(item.validate) ? item.validate : function(value, is) { return true; };

    //store processed item
    schematic[key] = result;
});
fork icon0
star icon0
watch icon2

+ 7 other calls in file