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

resolve-last

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-last

Created by create-n

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

resolve-last

Build Status NPM Version NPM Downloads MIT License Standard Version Codecov

👌Only resolve last promise

Install

yarn add resolve-last
// or
npm install resolve-last

Usage

import resolveLast from 'resolve-last';

// yourAsyncFunction: (...args: Arguments) => Promise<Result>
const resolveLastAsyncFunction = resolveLast(yourAsyncFunction);

button.addEventListener('click', async function(e) {
  await resolveLastAsyncFunction(...args);
  // `console.log` only run with last called args
  console.log('resolved with ' + args.join(', '));
});

(Project created by create-n.)

FAQs

Package last updated on 21 Dec 2019

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