{"name":"isomorphic-fetch","version":"2.0.0","description":"Isomorphic WHATWG Fetch API, for Node & Browserify","browser":"npm-client.js","main":"server.js","scripts":{"files":"find . -name '*.js' ! -path './node_modules/*' ! -path './bower_components/*'","test":"jshint `npm run -s files` && lintspaces -i js-comments -e .editorconfig `npm run -s files` && mocha","start":"node server.js"},"repository":{"type":"git","url":"git://github.com/matthew-andrews/node-fetch.git"},"author":{"name":"Matt Andrews","email":"matt@mattandre.ws"},"license":"MIT","bugs":{"url":"https://github.com/matthew-andrews/node-fetch/issues"},"homepage":"https://github.com/matthew-andrews/node-fetch","dependencies":{"node-fetch":"^1.0.1","whatwg-fetch":"git+https://github.com/matthew-andrews/fetch#ie9"},"devDependencies":{"chai":"^1.10.0","es6-promise":"^2.0.1","jshint":"^2.5.11","lintspaces-cli":"0.0.4","mocha":"^2.1.0","nock":"^0.56.0","npm-prepublish":"^1.0.2"},"gitHead":"c84e497a770673d68bbf18847d2afa5830da0a28","_id":"isomorphic-fetch@2.0.0","_shasum":"febd208ddcd99ccb7c27a1fc9f84b053c80537be","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mattandrews","email":"matt@mattandre.ws"},"maintainers":[{"name":"mattandrews","email":"matt@mattandre.ws"}],"dist":{"shasum":"febd208ddcd99ccb7c27a1fc9f84b053c80537be","tarball":"http://registry-npm.ywwl.com/isomorphic-fetch/download/isomorphic-fetch-2.0.0.tgz","integrity":"sha512-UZQZlIXRv/wXxjnir/twR3xtzOgE8Qk92jePJBc1O8NerpJU5AAdBZj03DH8dWPxWhctE/gBtaIBsqwXK1/8AQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC0wgh4wZHKSiYm6YmLtuoXySY1BGHnJTjb0nyt8idgIQIgdNlNathZNJbYUchW1WampPxxsSBPDo0h3tDu4jvSTc0="}],"size":2416,"noattachment":false,"key":"/isomorphic-fetch/-/isomorphic-fetch-2.0.0.tgz"},"directories":{},"readme":"isomorphic-fetch [![Build Status](https://travis-ci.org/matthew-andrews/isomorphic-fetch.svg?branch=master)](https://travis-ci.org/matthew-andrews/isomorphic-fetch)\n================\n\nFetch for node and Browserify.  Built on top of [GitHub's WHATWG Fetch polyfill](https://github.com/github/fetch).\n\n## Warnings\n\n- This adds `fetch` as a global so that its API is consistent between client and server.\n\nFor [ease-of-maintenance and backward-compatibility reasons][why polyfill], this library will always be a polyfill. As a \"safe\" alternative, which does not modify the global, consider [fetch-ponyfill][].\n\n[why polyfill]: https://github.com/matthew-andrews/isomorphic-fetch/issues/31#issuecomment-149668361\n[fetch-ponyfill]: https://github.com/qubyte/fetch-ponyfill\n\n## Why Use Isomorphic Fetch\n\nThe Fetch API is currently [not implemented consistently](http://caniuse.com/#search=fetch) across browsers. This module will enable you to use `fetch` in your Node code in a cross-browser compliant fashion. The Fetch API is part of the Web platform API defined by the standards bodies WHATWG and W3C.\n\n## Installation\n\n### NPM\n\n```sh\nnpm install --save isomorphic-fetch\n```\n\n### Bower\n\n```sh\nbower install --save isomorphic-fetch\n```\n\n## Usage\n\n```js\nrequire('isomorphic-fetch');\n\nfetch('//offline-news-api.herokuapp.com/stories')\n\t.then(function(response) {\n\t\tif (response.status >= 400) {\n\t\t\tthrow new Error(\"Bad response from server\");\n\t\t}\n\t\treturn response.json();\n\t})\n\t.then(function(stories) {\n\t\tconsole.log(stories);\n\t});\n```\n\n## License\n\nAll open source code released by FT Labs is licenced under the MIT licence.  Based on [the fine work by](https://github.com/github/fetch/pull/31) **[jxck](https://github.com/Jxck)**.\n\n## Alternatives\n\n- [cross-fetch](https://github.com/lquixada/cross-fetch#why-not-isomorphic-fetch)\n- Using [node-fetch](https://github.com/node-fetch/node-fetch) and the [Fetch polyfill](https://github.com/github/fetch) directly (or from [polyfill.io](https://polyfill.io), or relying on [the browser's implementation of the Fetch API](https://caniuse.com/fetch)).\n","publish_time":1423603376987,"_cnpm_publish_time":1423603376987,"dist-tags":{"latest":"3.0.0"}}