JSPM

fetch-detector

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

Detector fetch based on browser version

Package Exports

  • fetch-detector

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 (fetch-detector) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Fetch Detector

有些浏览器虽然支持 Fetch API 但不完整,如 Chrome 45 和 Firefox 33 版本 response 中的中文会乱码2。本库的作用是只在 Chrome >= 46,Firefox >= 39 时才开启原生 Fetch,否则使用 XHR polyfill。

Install

npm install 'fetch-detector'

Usage

一定要与 fetch-ie8 一起使用, 并且放到 fetch-ie8 前引用。

import 'fetch-detector'
import 'fetch-ie8'

License

MIT