1.0.0 ⢠Published 3 years ago
promise.ms v1.0.0
Promise ms
ā A light-weight package for timing promises
Usage
$ npm install promise.ms<script src="https://unpkg.com/promise.ms"></script> <!-- Client Side -->After installing, import promise.ms (nodejs only)
require("promise.ms");You can use the prototype ms on any promise to get the amount of milliseconds a promise took to resolve
promise.ms((ms) => {
console.log("time:", ms);
});
// or
(async () => {
const ms = await promise.ms();
console.log("time:", ms);
})();1.0.0
3 years ago