feat: Collection::createClone

This commit is contained in:
cha0s 2019-09-08 07:40:07 -05:00
parent 3296f3d196
commit d77fc13592

View File

@ -23,6 +23,13 @@ export function Collection(type) {
}
}
createClone() {
const Items = this.constructor;
const items = new Items();
items.clone(this);
return items;
}
count() {
return this[plural].length;
}