UNPKG

scrivito

Version:

Scrivito is a professional, yet easy to use SaaS Enterprise Content Management Service, built for digital agencies and medium to large businesses. It is completely maintenance-free, cost-effective, and has unprecedented performance and security.

18 lines (15 loc) 251 B
export function promiseAndFinally<T>( promise: Promise<T>, handler: () => void ): Promise<T> { return promise.then( (value) => { handler(); return value; }, (error) => { handler(); throw error; } ); }