{"_rev":"3-07557d55f8d2509a8ab7bf2a376db460","time":{"created":"2026-01-19T08:23:06.873Z","modified":"2026-01-19T08:23:07.307Z","1.0.3":"2026-01-15T09:40:42.487Z","1.0.4":"2026-01-19T08:23:07.096Z"},"_id":"@daouy/isomorphic-unfetch","name":"@daouy/isomorphic-unfetch","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.4":{"name":"@daouy/isomorphic-unfetch","version":"1.0.4","description":"Switches between unfetch & node-fetch for client & server.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/developit/unfetch.git"},"browser":"browser.js","main":"index.js","types":"index.d.ts","dependencies":{"unfetch":"^4.2.0"},"publishConfig":{"access":"public"},"_id":"@daouy/isomorphic-unfetch@1.0.4","bugs":{"url":"https://github.com/developit/unfetch/issues"},"homepage":"https://github.com/developit/unfetch#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-nwCJ3K4BALVJAnaTrlk4hucphB7XQ/h9ylf5SJi/kY9JnKLM4v9GLwdZnLzBQIdvn4ixLhVf1QwEqVpqJYWS1g==","shasum":"d9f7361c9803bd452062944c801ac16b8550afc0","tarball":"https://registry.npmjs.org/@daouy/isomorphic-unfetch/-/isomorphic-unfetch-1.0.4.tgz","fileCount":6,"unpackedSize":248902,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIG6/JalV9CkkQ+5KWuTBrkFoaxE/Jf5pBC8HLBmaF0SrAiEAzO4sLHvDyubSZrr/BgKP9ALwjL2B0fSoZMojkmSqG48="}]},"_npmUser":{"name":"daouy","email":"freemanitvn@gmail.com"},"directories":{},"maintainers":[{"name":"daouy","email":"freemanitvn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/isomorphic-unfetch_1.0.4_1768810986961_0.14165278926223723"},"_hasShrinkwrap":false}},"maintainers":[{"name":"daouy","email":"freemanitvn@gmail.com"}],"description":"Switches between unfetch & node-fetch for client & server.","homepage":"https://github.com/developit/unfetch#readme","repository":{"type":"git","url":"git+https://github.com/developit/unfetch.git"},"bugs":{"url":"https://github.com/developit/unfetch/issues"},"license":"MIT","readme":"# Isomorphic Unfetch\n\nSwitches between [unfetch](https://github.com/developit/unfetch) & [node-fetch](https://github.com/bitinn/node-fetch) for client & server.\n\nFork differences:\n1. On Node, `node-fetch` is always used instead of `global.fetch`.\nThis is a workaround this [`undici` bug](https://github.com/nodejs/undici/issues/1776)\nwhich is negatively affecting many versions of Node and Next.js.\n2. Don't polyfill, leave `global.fetch` alone.\n3. Applies a patch on node-fetch-cjs to [this node-fetch bug](https://github.com/node-fetch/node-fetch/issues/1576) by following [this PR](https://github.com/Treverix/node-fetch/commit/625fd385b3a72348266ed3849c8a88391059e9dd?diff=split).  Then we inline node-fetch-cjs into the built version of server.js, so that it will contain our patched version of node-fetch-cjs.\n\n## Install\n\nThis project uses [node](http://nodejs.org) and [npm](https://npmjs.com). Go check them out if you don't have them locally installed.\n\n```sh\n$ npm i isomorphic-unfetch\n```\n\nThen with a module bundler like [rollup](http://rollupjs.org/) or [webpack](https://webpack.js.org/), use as you would anything else:\n\n```javascript\n// using ES6 modules\nimport fetch from 'isomorphic-unfetch'\n\n// using CommonJS modules\nconst fetch = require('isomorphic-unfetch')\n```\n\n## Usage\n\nAs a [**ponyfill**](https://ponyfill.com):\n\n```js\nimport fetch from 'isomorphic-unfetch';\n\nfetch('/foo.json')\n  .then( r => r.json() )\n  .then( data => {\n    console.log(data);\n  });\n```\n\nGlobally, as a [**polyfill**](https://ponyfill.com/#polyfill):\n\n```js\nimport 'isomorphic-unfetch';\n\n// \"fetch\" is now installed globally if it wasn't already available\n\nfetch('/foo.json')\n  .then( r => r.json() )\n  .then( data => {\n    console.log(data);\n  });\n```\n\n## License\n\n[MIT License](LICENSE.md) © [Jason Miller](https://jasonformat.com/)\n","readmeFilename":"readme.md"}