lying

1.0.0 • Public • Published

lying

Use Promise.all and Promise.settled as typed objects

Example

import lying from "lying";
 
const promises = await All({
      octocat: fetch("http://api.github.com/users/octocat"),
      octocatJson: fetch("http://api.github.com/users/octocat").then(e => e.json()),
});
console.log(promises.octocatJson); // show json user
console.log(promises.octocat.status); // print status code (number)

Readme

Keywords

none

Package Sidebar

Install

npm i lying

Weekly Downloads

34

Version

1.0.0

License

MIT

Unpacked Size

73.5 kB

Total Files

13

Last publish

Collaborators

  • g4rcez