joshrtay / find-mod

Find the closest directory containing node_modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Find the closest directory containing node_modules.


Languages

Language:JavaScript 64.9%Language:Makefile 35.1%