How to use the extend.apply function in extend

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

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scottcorgan / lag / dist / lag.js View on Github external
.then(function (objects) {
      return promise(extend.apply(null, objects));
    });
}, {
github quilljs / quill / core / editor.js View on Github external
});
    } else {
      lines = this.scroll.lines(index, length);
      leaves = this.scroll.descendants(LeafBlot, index, length);
    }
    const formatsArr = [lines, leaves].map(blots => {
      if (blots.length === 0) return {};
      let formats = bubbleFormats(blots.shift());
      while (Object.keys(formats).length > 0) {
        const blot = blots.shift();
        if (blot == null) return formats;
        formats = combineFormats(bubbleFormats(blot), formats);
      }
      return formats;
    });
    return extend.apply(extend, formatsArr);
  }
github particles / particles / lib / config.js View on Github external
Config.prototype.mergeChain = function(chain) {
  var args = [true, {}].concat(chain);
  args.push(this.data);

  this.data = extend.apply(null, args);
};
github unicorn-fail / dreditor / src / js / Utility.js View on Github external
extend(deep, obj) {
    return extend.apply({}, arguments);
  },
github Swizz / snabbdom-pragma / dist / index.es6.js View on Github external
var extend = function () {
  var objs = [], len = arguments.length;
  while ( len-- ) objs[ len ] = arguments[ len ];

  return _extend.apply(void 0, [ true ].concat( objs ));
};
github avwo / whistle / lib / util / index.js View on Github external
var execCallback = function() {
    if (--len > 0) {
      return;
    }
    if (isJson) {
      result = result.map(parseJSON).filter(noop);
      if (result.length > 1) {
        result.reverse();
        if (typeof result[0] !== 'object') {
          result[0] = {};
        }
        callback(extend.apply(null, result));
      } else {
        callback(result[0]);
      }
    } else {
      if (isJsHtml) {
        result = wrapTag(result, isBin, charset, wrapJs);
      } else if (isCssHtml) {
        result = wrapTag(result, isBin, charset, wrapCss);
      }
      if (rule.isRawList) {
        callback(result);
      } else {
        callback(fileMgr.joinData(result, !isBin));
      }
    }
  };
github ultraq / thymeleaf-layout-dialect-js / src / utilities / Objects.js View on Github external
export function merge(target, ...source) {

	return extend.apply(null, [true, target].concat(source));
}
github googleapis / google-cloud-node / packages / vision / src / index.js View on Github external
function flattenAnnotations(annotations) {
        return extend.apply(null, annotations);
      }

extend

Port of jQuery.extend for node.js and the browser

MIT
Latest version published 6 years ago

Package Health Score

74 / 100
Full package analysis