feat: Collection::createClone
This commit is contained in:
parent
3296f3d196
commit
d77fc13592
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user