0.1.0 • Published 13 years ago
callerid v0.1.0
CallerId
Allows you to retrieve the filename or directory path of the file that has required your file/module.
Installation
$ npm install calleridFeatures
- retrieve both the filename and the directory path
methods
dirnameretrieve the directory path instead of the filename
Usage
Initiate
var callerid = require('callerid');Get last caller
var file = callerid(),
dir = callerid.dirname();Custom Levels
//back two files
callerid(2);
//directory path two files ago
callerid.dirname(2);Running tests
$ npm install
$ npm testLicense
(The MIT License)
0.1.0
13 years ago