A typical use case would be some express routes that resolve database queries that should only be called once and respond with the same result to all requests.
import uniquePromise from '@public-function/unqiue-promise';
const executeLongRunningFunction = async () => {
// is only called once
}
const results = await Promise.all([
uniquePromise('some-id', executeLongRunningFunction),
uniquePromise('some-id', executeLongRunningFunction),
]);