# augment-with **Repository Path**: mirrors_WebReflection/augment-with ## Basic Information - **Project Name**: augment-with - **Description**: basic utility to augment a constructor - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-19 - **Last Updated**: 2026-01-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # augment-with basic utility to augment a constructor ### how ```js var augmentWith = require('augment-with'); var augmentWithArray = require('augment-with-array'); var Collection = augmentWith( augmentWithArray, function Collection(array) { this.push.apply(this, array); } ); Collection.prototype.each = funcion each(fn) { this.forEach(function (value, i, self) { fn.call(this, i, value); }, this); }; new Collection(['a', 'b', 'c']).each(function (i, value) { console.log(i, value); }); ```