4 * methods a collection must implement
20 * Collection base class from which implementations inherit
23 function Collection () {}
25 for (var i = 0, len = methods.length; i < len; ++i) {
26 var method = methods[i];
27 Collection.prototype[method] = notImplemented(method);
30 module.exports = exports = Collection;
31 Collection.methods = methods;
34 * creates a function which throws an implementation error
37 function notImplemented (method) {
39 throw new Error('collection.' + method + ' not implemented');