Skip to content

greglearns/node-greglearns-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published