Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(function (objects) {
return promise(extend.apply(null, objects));
});
}, {
});
} 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);
}
Config.prototype.mergeChain = function(chain) {
var args = [true, {}].concat(chain);
args.push(this.data);
this.data = extend.apply(null, args);
};
extend(deep, obj) {
return extend.apply({}, arguments);
},
var extend = function () {
var objs = [], len = arguments.length;
while ( len-- ) objs[ len ] = arguments[ len ];
return _extend.apply(void 0, [ true ].concat( objs ));
};
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));
}
}
};
export function merge(target, ...source) {
return extend.apply(null, [true, target].concat(source));
}
function flattenAnnotations(annotations) {
return extend.apply(null, annotations);
}