ts-devrant
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

The great Rantscript done better in TypeScript

Know what to provide! request-example

Know what you get! response-suggestions

Size

  • 16K minified (using webpack, browser target)
  • UMD Module 40K du -sh -I "*.d.ts" lib
  • Browser Module 36K du -sh -I "*.d.ts" browser

Different endpoint / Updating config

import DevRantAPI from "ts-devrant";

DevRantAPI.updateConfig({
    api: "https://my-super-secret-api.io/",
});

Custom requests

Endpoint not available, or not documented? Make a custom request!

import DevRantAPI from 'ts-devrant'

DevRantAPI.request(
    'secret-endpoint',
    {
        myBody: true
    },
    {
        header: {
            x-new-header: "secret"
        }
    }
)

Package Sidebar

Install

npm i ts-devrant

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

49.4 kB

Total Files

34

Last publish

Collaborators

  • dr010001111