1.0.1 • Published 8 years ago

resolve-from-caller v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

resolve-from-caller

Resolve module paths relative to caller module file.

Travis Build Status NPM module NPM downloads

Installation

npm install --save resolve-from-caller

Usage

lib/index.js:

  const resolve = require('resolve-from-caller');
  console.log(resolve('./a'));
  //-> a.js

user-land.js:

  const lib = require('./lib');
  

a.js:

  // anything

Credits

This module begin as a PR to module-resolve-as-caller.

License

The MIT License (MIT)

Copyright (c) 2016 Andrea Parodi