s-yadav/jsonQ · jsonQ.js
javascript logo
function matchPath(a, b) {
        var regex = new RegExp('^' + a.join('~~'), 'i');
        return regex.test(b.join('~~'));
    }
Similar code snippets
1.
xtuc/webassemblyjs · libwabt.js
Match rating: 42.5% · See similar code snippets
javascript logo
function vt(a,b){a=+a;b=+b;return +(+At(a,b))}
2.
MohammadYounes/rtlcss · util.js
Match rating: 41.84% · See similar code snippets
javascript logo
function (value, a, b, options) {
    var expr = escapeRegExp(a) + '|' + escapeRegExp(b)
    options = options || DEFAULT_STRING_MAP_OPTIONS
    var greedy = options.hasOwnProperty('greedy') ? options.greedy : config.greedy
    if (!greedy) {
      expr = '\\b(' + expr + ')\\b'
    }
    var flags = options.ignoreCase ? 'img' : 'mg'
    return value.replace(new RegExp(expr, flags), function (m) { return compare(m, a, options.ignoreCase) ? b : a })
  }
3.
pawelczak/EasyAutocomplete · jquery.easy-autocomplete.min.js
Match rating: 40.91% · See similar code snippets
javascript logo
function i(a,b){var c=h(b);return(a+"").replace(new RegExp("("+c+")","gi"),"<b>$1</b>")}
4.
krampstudio/aja.js · aja.min.js
Match rating: 40.58% · See similar code snippets
javascript logo
function(b){if(b=this.string(b),a.indexOf(b.toLowerCase())<0)throw new TypeError("a type in ["+a.join(", ")+"] is expected, but "+b+" given");return b.toLowerCase()}
5.
imcuttle/node-markdown-image-size · index.js
Match rating: 40.52% · See similar code snippets
javascript logo
function join(source, src) {
  if (isUrlString(source)) {
    return require('url-join')(source, src)
  }
  return path.join(source, src)
}
6.
antvis/data-set · g2.js
Match rating: 40.5% · See similar code snippets
javascript logo
function (a, b) {
  return a = +a, b -= a, function (t) {
    return Math.round(a + b * t);
  };
}
7.
cornerstonejs/cornerstoneTools · cornerstoneWADOImageLoaderCodecs.min.js
Match rating: 40.24% · See similar code snippets
javascript logo
nction(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]},a
8.
nicoespeon/gitgraph.js · gitgraph.min.js
Match rating: 39.88% · See similar code snippets
javascript logo
function(a) {
      var b = f(this.path);
      b
        ? b.x === a.x && b.y === a.y
          ? "start" !== b.type && "end" === a.type
            ? (b.type = "end")
            : "joint" === a.type || this.path.push(a)
          : "joint" === a.type
            ? (a.x - b.x) * this.template.commit.spacingX < 0
              ? this.path.push(a)
              : (a.y - b.y) * this.template.commit.spacingY < 0 &&
                this.path.push(a)
            : this.path.push(a)
        : this.path.push(a);
    }
9.
bjnortier/lathe · three.min.js
Match rating: 39.37% · See similar code snippets
javascript logo
function(a){var b=this.elements,c=new THREE.Vector4;c.x=b[0]*a.x+b[4]*a.y+b[8]*a.z+b[12]*a.w;c.y=b[1]*a.x+b[5]*a.y+b[9]*a.z+b[13]*a.w;c.z=b[2]*a.x+b[6]*a.y+b[10]*a.z+b[14]*a.w;c.w=a.w?b[3]*a.x+b[7]*a.y+b[11]*a.z+b[15]*a.w:1;return c}
10.
daniel-lundin/snabbt.js · matrix.js
Match rating: 39.34% · See similar code snippets
javascript logo
function assignedMatrixMultiplication(a, b, res) {
  // Unrolled loop
  res[0] = a[0] * b[0] + a[1] * b[4] + a[2] * b[8] + a[3] * b[12];
  res[1] = a[0] * b[1] + a[1] * b[5] + a[2] * b[9] + a[3] * b[13];
  res[2] = a[0] * b[2] + a[1] * b[6] + a[2] * b[10] + a[3] * b[14];
  res[3] = a[0] * b[3] + a[1] * b[7] + a[2] * b[11] + a[3] * b[15];

  res[4] = a[4] * b[0] + a[5] * b[4] + a[6] * b[8] + a[7] * b[12];
  res[5] = a[4] * b[1] + a[5] * b[5] + a[6] * b[9] + a[7] * b[13];
  res[6] = a[4] * b[2] + a[5] * b[6] + a[6] * b[10] + a[7] * b[14];
  res[7] = a[4] * b[3] + a[5] * b[7] + a[6] * b[11] + a[7] * b[15];

  res[8] = a[8] * b[0] + a[9] * b[4] + a[10] * b[8] + a[11] * b[12];
  res[9] = a[8] * b[1] + a[9] * b[5] + a[10] * b[9] + a[11] * b[13];
  res[10] = a[8] * b[2] + a[9] * b[6] + a[10] * b[10] + a[11] * b[14];
  res[11] = a[8] * b[3] + a[9] * b[7] + a[10] * b[11] + a[11] * b[15];

  res[12] = a[12] * b[0] + a[13] * b[4] + a[14] * b[8] + a[15] * b[12];
  res[13] = a[12] * b[1] + a[13] * b[5] + a[14] * b[9] + a[15] * b[13];
  res[14] = a[12] * b[2] + a[13] * b[6] + a[14] * b[10] + a[15] * b[14];
  res[15] = a[12] * b[3] + a[13] * b[7] + a[14] * b[11] + a[15] * b[15];

  return res;
}