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

mini-copromise

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini-copromise

Minimal Promise-based coroutines. Performant, with minimal fluff.

latest
Source
npmnpm
Version
3.0.2
Version published
Maintainers
1
Created
Source

mini-copromise

project status

Replaced with minico: It's the same thing.

A tinier Promise-based coroutine. Based off of copromise

Relies on the global Promise to work.

  • 592 bytes uncompressed
  • 453 bytes minified with uglify-js 2.6.2
  • 258 bytes minified with uglify-js 2.6.2, and compressed with gzip 1.8

npm install mini-copromise

import copromise from 'mini-copromise'

const doThings = copromise(function * doThings (input) {
  yield washDishes()
  try {
      yield makePopcorn()
  } catch (err) {
      yield someFailureHandler(err)
  }
  return 'nice' + input
})

doThings(2).then((value) => {
  console.log('Copromise success:', value) // Copromise success: nice2
}).catch((err) => {
  console.log('An error occured', err)
})

Keywords

async

FAQs

Package last updated on 26 Oct 2016

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