@fatcherjs/middleware-json
TypeScript icon, indicating that this package has built-in type declarations

3.0.0-alpha-10 • Public • Published

@fatcherjs/middleware-json

npm package install size Size

Install

NPM

>$ npm install @fatcherjs/middleware-json

CDN

<script src="https://cdn.jsdelivr.net/npm/@fatcherjs/middleware-json/dist/index.min.js"></script>

Usage

import { fatcher } from 'fatcher';
import { json } from '@fatcherjs/middleware-json';

const res = await fatcher('https://foo.bar/get', {
  middlewares: [json()],
});

const streamingJson = await res.readStreamAsJson((string: string, buffer: Uint8Array) => {
  console.log(string, buffer); // chunks for streaming string
}); // full result

License

MIT

/@fatcherjs/middleware-json/

    Package Sidebar

    Install

    npm i @fatcherjs/middleware-json

    Weekly Downloads

    2

    Version

    3.0.0-alpha-10

    License

    none

    Unpacked Size

    5.89 kB

    Total Files

    7

    Last publish

    Collaborators

    • fanhaoyuan