JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3281
  • Score
    100M100P100Q124972F
  • License MIT

add charset support for node's superagent

Package Exports

  • superagent-charset

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (superagent-charset) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

superagent-charset

add charset support for node's superagent

Install

$ npm i superagent-charset

Usage

.charset(encoding) , will passed to iconv-lite

var assert = require('assert');
var request = require('superagent-charset');

request
    .get('http://www.sohu.com/')
    .charset('gbk')
    .end(function(err,res) {
        assert(res.text.indexOf('搜狐') > -1);
    });

License

the MIT License, Magicdawn(784876393@qq.com)