{"name":"isomorphic-fetch","version":"1.6.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":{"whatwg-fetch":"^0.7.0","xmlhttprequest":"git+https://github.com/matthew-andrews/node-XMLHttpRequest"},"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":"38b7466267555d33f1390cb3a048c5ea9c9d27f0","_id":"isomorphic-fetch@1.6.0","_shasum":"219cfeac4e5f3aa23ab1b0e471053fd3f6720d26","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mattandrews","email":"matt@mattandre.ws"},"maintainers":[{"name":"mattandrews","email":"matt@mattandre.ws"}],"dist":{"shasum":"219cfeac4e5f3aa23ab1b0e471053fd3f6720d26","tarball":"http://registry-npm.ywwl.com/isomorphic-fetch/download/isomorphic-fetch-1.6.0.tgz","integrity":"sha512-sw5S2h6vNzYyC5g2fRlHwRa+DhMhjTRDGM6Z5yNxIpcNSCMatHvykQFzY1CtKgWiKKHxOB6LwKm0zjKunKiulQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC++rxAkPnqcVKIOCTOQ6rQeib4prTqzz0xGX6K4t+inQIgNN0OuMMPbf1KtmkgvwDplbiyw+ei3RjxQ79gS8WxiL8="}],"size":2483,"noattachment":false,"key":"/isomorphic-fetch/-/isomorphic-fetch-1.6.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":1422128574108,"_cnpm_publish_time":1422128574108,"dist-tags":{"latest":"3.0.0"}}