Merge pull request #264 from m59peacemaker/master

use browser natives when bundled for the browser
This commit is contained in:
David Frank 2017-05-12 13:00:44 +08:00 committed by GitHub
commit 1dba86665a
2 changed files with 5 additions and 0 deletions

4
browser.js Normal file
View File

@ -0,0 +1,4 @@
module.exports = exports = window.fetch;
exports.Headers = window.Headers;
exports.Request = window.Request;
exports.Response = window.Response;

View File

@ -3,6 +3,7 @@
"version": "2.0.0-alpha.3",
"description": "A light-weight module that brings window.fetch to node.js",
"main": "lib/index.js",
"browser": "./browser",
"module": "lib/index.es.js",
"files": [
"lib/index.js",