UNPKG

xl-infinite-tree

Version:

A browser-ready tree library that can efficiently display a large amount of data using infinite scrolling.

27 lines (23 loc) 826 B
'use strict'; /* eslint no-restricted-syntax: 0 */ var extend = function extend(target) { for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { sources[_key - 1] = arguments[_key]; } if (target === undefined || target === null) { throw new TypeError('Cannot convert undefined or null to object'); } var output = Object(target); for (var index = 0; index < sources.length; index++) { var source = sources[index]; if (source !== undefined && source !== null) { for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { output[key] = source[key]; } } } } return output; }; module.exports = extend;