Socket
Socket
Sign inDemoInstall

repl-callback

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    repl-callback

A handy callback to use from the REPL console.


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

node-repl-callback

A really handy callback to use from the REPL console.

Installation

npm install repl-callback

Usage

Quick and simple usage example:

node
> callback = require('repl-callback')
{ [Function: callback] generate: [Function: generate] }
> fs = require('fs')
...
> fs.readFile('somefile', callback.bind(a = {}))
undefined
> Done.
> a
{ ... }
> fs.readFile('somefile', callback.bind(b = { message: 'Different completion message!' }))
undefined
> Different completion message!
> b
{ ... }
> c = callback.generate()
[Function: callback]
> fs.readFile('somefile', c)
undefined
> Done.
> c
{ ... }
> d = callback.generate()
[Function: callback]
> d.message = 'Different completion message!'
'Different completion message!'
> fs.readFile('somefile', d)
undefined
> d
{ ... }

FAQs

Last updated on 24 Aug 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc