cross-fetch
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "cross-fetch", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Universal WHATWG Fetch API for Node, Browsers and React Native", | ||
@@ -9,11 +9,8 @@ "homepage": "https://github.com/lquixada/cross-fetch", | ||
"scripts": { | ||
"prepublish": "RU_ENV=production npm run build && npm test", | ||
"prepublish": "NODE_ENV=production npm run build && npm test", | ||
"prepush": "npm test", | ||
"build": "npm run build:polyfill && npm run build:ponyfill", | ||
"build:polyfill": "RU_TYPE=polyfill rollup -c", | ||
"build:ponyfill": "RU_TYPE=ponyfill rollup -c", | ||
"build": "rollup -c", | ||
"test": "npm run lint && npm run mocha", | ||
"mocha": "mocha", | ||
"lint": "eslint .", | ||
"serve": "http-server" | ||
"lint": "eslint ." | ||
}, | ||
@@ -36,3 +33,2 @@ "repository": { | ||
"eslint": "4.7.2", | ||
"http-server": "0.10.0", | ||
"husky": "0.14.3", | ||
@@ -39,0 +35,0 @@ "mocha": "3.5.3", |
@@ -9,2 +9,9 @@ cross-fetch | ||
- **Platform agnostic**: browsers, node or react native | ||
- **Optional polyfill**: it's up to you if something is going to be added to the global object or not | ||
- **Simple import**: no configuration required | ||
- **WHATWG compliant**: it should be working the same way wherever your code runs. | ||
- **Small**: 2.5kb gzipped | ||
* * * | ||
@@ -38,2 +45,12 @@ | ||
The CDN build is also available on unpkg: | ||
```html | ||
<script src="//unpkg.com/cross-fetch/dist/cross-fetch.js"></script> | ||
``` | ||
This adds the fetch function to the window object. Note that this is not UMD compatible. | ||
* * * | ||
@@ -80,5 +97,6 @@ | ||
## API | ||
## API & Demo | ||
You can find a comprehensive doc at [Github's fetch](https://github.github.io/fetch/) page. | ||
You can find a comprehensive doc at [Github's fetch](https://github.github.io/fetch/) page. Use the | ||
[**JSFiddle playground**](https://jsfiddle.net/lquixada/3ypqgacp/) ➡️ in different browsers. | ||
@@ -90,11 +108,5 @@ | ||
I did a lot of research in order to find a fetch library that could meet theses criterias: | ||
I did a lot of research in order to find a fetch library that could be simple, cross-platorm and provide polyfill as an option. There's a plethora of libs out there but none could match those requirements. | ||
- [x] Simple import / require (no configuration required) | ||
- [x] Platform agnostic (client, server or react native) | ||
- [x] Optional polyfill (it's up to you if something is going to be added to the global object or not) | ||
There's a plethora of libs out there but none could match those requirements. | ||
#### Why not isomorphic-fetch? | ||
@@ -101,0 +113,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
51803
9
11
117
137
4