/find-mod

Find the closest directory containing node_modules.

Primary LanguageJavaScript

find-mod

Build status Git tag NPM version Code style

Find the closest directory containing node_modules.

Installation

$ npm install find-mod

Usage

const findMod = require('find-mod')

co.wrap(function * ()  {
  yield findMod(__dirname) // => $HOME/find-mod
})

API

findMod(dir)

  • dir - Director to start search.

Returns:

License

MIT