codebase module search

npm install jut
3 downloads in the last day
13 downloads in the last week
19 downloads in the last month


Build Status

locate used modules


npm install -g jut


ls *.js | jut -m badmodule

or use it with jung and a test runner!

jung -f '\.js$' -- test_runner $(ls tests/**/*.js | jut -m '$JUNG_FILE' -Fnj)

or something else. the world is yours.


jut [options] --module <module_name>

Options are:

  • --module, -m <modulename> Find files that require <modulename>
  • --file, -f <filename> Search <filename> for modules
  • --justmatch, -j Just print the filename that matches
  • --fullpath, -F Print full path to matched file
  • --nocolor, -n Don't colorize results
  • --version, -v Print current version
  • --help, -h Print help

as a module

give it a stream of javascript files and get a stream of files that use module.

something like:

var jut = require('jut'),
    ls = require('ls-stream'), // for example
    convert = require('dotpath-stream'),
    filter = require('stream-police'),
    fs = require('fs')

var options = {
  module: 'falafel', // for example
  justmatch: false, // default
  fullpath: false, // default
  nocolor: false // default

    .pipe(convert('path')) // reduce ls-stream object to path string
    .pipe(filter({ verify: [/\.js$/] })) // only .js extension
    .pipe(jut(options)) // right over to jut
    .pipe(fs.createWriteStream('falafel-apps.txt')) // out to a file



npm loves you