@nathanfaucett/create_pool

0.0.3 • Public • Published

createPool

creates a pooler function for a Constructors

var createPool = reqiure("@nathanfaucett/create_pool");

function Vector(x, y) {
    this.x = x;
    this.y = y;
}

var createVector = createPool(Vector),
    vec = createVector(10, 5); // Vector {x: 10, y: 5}

Package Sidebar

Install

npm i @nathanfaucett/create_pool

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • nathanfaucett