brikteknologier / seraph-model

thin model layer for seraph/neo4j (node.js)
MIT License
111 stars 28 forks source link

Expose Model class #95

Closed vinerz closed 9 years ago

vinerz commented 9 years ago

Hello! Thank you for this great tool. I am having a great time discovering neo4j and seraph.

However, I miss the exposal of the Model object.

I want to create some new methods that will apply to every new model created by the factory, but I can't find a way to do that without creating a fork of the module only to change the way it exports the model factory.

jonpacker commented 9 years ago

Good idea! I've exposed it as model.modelPrototype. So you can change it by adding stuff like:

var model = require('seraph-model');
model.modelPrototype.myNewFunction = function() {}
vinerz commented 9 years ago

Whoa, that was quick! Thank you Jon, you rock!