
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
awesome-only-resolves-last-promise
Advanced tools
Wraps an async function and ensure only last call will actually resolve/reject
npm install --save awesome-only-resolves-last-promise
// or
yarn add awesome-only-resolves-last-promise
import { onlyResolvesLast } from 'awesome-only-resolves-last-promise';
const asyncFunction = async (arg: number, arg2: string) => {
await delay(100);
return `val ${arg} ${arg2}`;
};
const wrappedAsyncFunction = onlyResolvesLast(asyncFunction);
const promise1 = wrappedAsyncFunction(1, '1');
const promise2 = wrappedAsyncFunction(2, '2');
const promise3 = wrappedAsyncFunction(3, '3');
// promise1 and promise2 will never resolve/reject
// promise3 will resolve in 100ms
Useful as an implementation detail of awesome-debounce-promise.
MIT © slorber
Looking for a React/ReactNative freelance expert with more than 5 years production experience? Contact me from my website or with Twitter.
FAQs
Wraps an async function and ensure only last call will actually resolve/reject
The npm package awesome-only-resolves-last-promise receives a total of 43,576 weekly downloads. As such, awesome-only-resolves-last-promise popularity was classified as popular.
We found that awesome-only-resolves-last-promise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.