fetch-charset-detection

August 10, 2021 ยท View on GitHub

Detect the encoding of a buffer and stringify it. Originally from node-fetch.

Install

npm install fetch-charset-detection

Usage

import convertBody from 'fetch-charset-detection';

convertBody(content);

API

convertBody(content, headers?)

content

Type: Buffer | TypedArray

The content to stringify.

headers

Type: Headers

The HTTP headers provided with the content.

Contents

  1. 1Install
  2. 2Usage
  3. 3API
  4. 3.1convertBody(content, headers?)