New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pifi

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pifi

Immediately invoked [pify](https://github.com/sindresorhus/pify)

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
8
-46.67%
Maintainers
1
Weekly downloads
 
Created
Source

pifi

Immediately invoked pify

Installation

npm install --save pifi

Usage

const pifi = require('pifi')
const fs = require('fs')

async function main () {
  console.log('Reading readme.md in 5 seconds')
  await pifi(cb => setTimeout(cb, 5000))

  console.log('Readind readme.md now')
  const content = await pifi(cb => fs.readFile('readme.md', cb))

  console.log('readme.md contains:', content)
}

API

pifi(fn[, promiseModule]) => Promise

Immediately invoke fn with a node-style callback, and return a promise that settles when the callback is called.

Keywords

promise

FAQs

Package last updated on 10 Jul 2018

Did you know?

Socket

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