0.5.1 ā€¢ Published 1 year ago

tapi.js v0.5.1

Weekly downloads
-
License
GPL-3.0-only
Repository
github
Last release
1 year ago

License TS Dependencies Stars

ko-fi

Imagine doing this...

http
  .get('/some-url-that-returns-an-object') // Get data šŸ“”
  .as(YourClass) // Map it onto your class āœØ
  .then((builtObject) => {
    builtObject.doSomething(); // Use it directly šŸŽ‰
  })

Or even this...

const builtObject = await http.get('/some-url-that-returns-an-object').as(YourClass)
builtObject.doSomething();

How?

Introducing tapi, a tiny TypeScript package used to define how to interpret any given API response as a typed object.

It automatically converts JSON objects into TypeScript class instances, however you can still configure it however you want with Aliases, Transformers, Mappers and more.


šŸš€ Get started šŸš€


More info

šŸ“¦ Check it out on npm

šŸ¦• Check it out on deno

šŸ˜± Check it out on Bundlephobia

ā˜ Use directly from the browser

šŸ“š Additional info on the file on libraries.io

Big thanks to anyone who contributes!

You could be here! Just follow the contributor's guide.

šŸ‘‡

Contributors


Thanks for using tapi! šŸ˜Š I hope it's been useful to you in some way.

0.5.1

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.6

1 year ago

0.5.0

1 year ago

0.4.3

2 years ago

0.4.2

2 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.2

3 years ago