greglearns-helper
v1.0.1
Published
Helper functions, greglearns-style
Downloads
2
Readme
node-greglearns-helper
Little helper functions that I use all the time.
This is probably something you don't want to use -- you should write your own that does the things you want it to do the way that you like them to be.
For each project, I like to have a 'helper.js' file at the project root. In that file, I require this one, and I also add this:
function requireFromRoot(file) {
return require(__dirname + '/' + file)
}
That way, requiring project files becomes:
var help = require('../../<whereever the project root is/helper')
var otherProjectFile = help.requireFromRoot('lib/whatever')