0.5.7 • Published 11 years ago
aronnax-pooling v0.5.7
aronnax pooling
An object pool for JS. Can be used for node or the browser.
The purpose is to minimize garbage collection, which can interfere with fast performance, especially in event looped systems such as games.
setup
Install with npm.
npm install aronnax-poolingRequire if using with nodejs or browserify.
var Pooled = require('aronnax-pooling');Extend from Pooled class
var myClass = Object.create(Pooled);Use make to create new objects,
var instance = myClass.make();or extend the classes constructor
function myClass() {
var inst = this.make();
return inst;
}Development
Install dependencies
npm installLint, test build
npm run lint
npm run test || testem
npm run compile-all