Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
'use strict';
module.exports = function replace(items) {
if (!items) {
return this;
}
if (Array.isArray(items)) {
const replaced = this.items.map((value, index) => items[index] || value);
return new this.constructor(replaced);
}
if (items.constructor.name === 'Collection') {
const replaced = { ...this.items, ...items.all() };
return new this.constructor(replaced);
}
const replaced = { ...this.items, ...items };
return new this.constructor(replaced);
};