Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (32 sloc) 1.06 KB


REPL utilities. This package provides additional utilities for working with node REPL:

  • doc prints documentation for the given function if documented as defined in expected format (
  • use requires given module and puts all it's exports into the scope (For details try doc(use))


npm install repl-utils


require('repl-utils') // Now you're ready to go!

doc(doc) // try this:

function doc(source) { ... }
Prints documentanion of the given function

doc(use) // Now this:

function use(id, options) { ... }
Like `require`, but also copies exports from the given module to the current
context. Optionally `options` can be passed to limit imports.

use('fs', { only: [ 'readFile' ] })     // only imports readFile
use('fs', { as: { writeFile: write })   // imports fs.writeFile as write
use('fs', { reload: true })             // reloads module

// Enjoy hacking!
Something went wrong with that request. Please try again.