MCPcopy Create free account
hub / github.com/sindresorhus/execa / createDeferred

Function createDeferred

lib/utils/deferred.js:1–7  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1export const createDeferred = () => {
2 const methods = {};
3 const promise = new Promise((resolve, reject) => {
4 Object.assign(methods, {resolve, reject});
5 });
6 return Object.assign(promise, methods);
7};

Callers 5

getReadableMethodsFunction · 0.90
addConcurrentStreamFunction · 0.90
spawnSubprocessAsyncFunction · 0.90
waitForStrictResponseFunction · 0.90
startSendMessageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected