inxilpro / node-app-root-path

Determine the root path to your project
MIT License
605 stars 29 forks source link

Main lib returns object, not path string #7

Closed mhkeller closed 9 years ago

mhkeller commented 9 years ago

The docs should be updated to reflect that require('app-root-path') returns an object, not the path string. It should be .require('app-root-path').path.

https://github.com/inxilpro/node-app-root-path/blob/master/lib/app-root-path.js#L37

inxilpro commented 9 years ago

You actually don't have to use .path because the object provides a toString() method. So if you use the object like a string, it will behave like a string.

That said, it might not hurt to document that quirk.

inxilpro commented 9 years ago

The README.md has been updated. Thanks!