sql-toolkit
Version:
A SQL Toolkit based on pure business objects passed to and from stateful data access objects
16 lines (12 loc) • 308 B
JavaScript
class BaseBoCollection {
constructor(props = {}) {
this.models = props.models || [];
}
static get displayName() {
return `${this.Bo.displayName}s`;
}
filter(predicate) {
return new this.constructor({ models: this.models.filter(predicate) });
}
}
module.exports = BaseBoCollection;