{"_id":"sync-fetch@0.7.1","bugs":{"url":"https://github.com/larsgw/sync-fetch/issues"},"dist":{"shasum":"b318fcff530c4b8eb91e1c290047fe456ff0056f","tarball":"http://registry-npm.ywwl.com/sync-fetch/download/sync-fetch-0.7.1.tgz","fileCount":12,"integrity":"sha512-tTw2sPVgJb/ZO+Uz5Cs1haWg7aL0cw+DvD8mXos+ws5YaelM3IBZ50M717T1+RD5Qq0TdeZ/EI/wVMnAdJA0Eg==","signatures":[{"sig":"MEYCIQCNwGylPXnSiOEUxbgTwuKW+J+woIuVs6tuvT/HSJf/XgIhAPbXqx4enQoPou+scPHtYTEpnXLTsFVGmb01J43SsxmX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC4UsEIpX/GMHU9Cgdf81lnXaVhCCl8FUunh6qKYm65CQIhAJ4PMmUWQv5nMQnIDondihRteQUTa1jHhP9Bjnf3xw9X"}],"unpackedSize":43451,"size":9980,"noattachment":false,"key":"/sync-fetch/-/sync-fetch-0.7.1.tgz"},"main":"index.js","name":"sync-fetch","unpkg":"bundle.js","author":{"name":"Lars Willighagen"},"browser":"browser.js","engines":{"node":">=22.12.0"},"gitHead":"9a31b471186ab6d0a4186310e33fcf672e288703","license":"MIT","scripts":{"lint":"standard","test":"mocha --throw-deprecation test/spec.js","build":"browserify -r .:sync-fetch -o bundle.js","version":"npm run changelog","changelog":"conventional-changelog -p angular && git add CHANGELOG.md","preversion":"npm run lint && npm run test","prepublishOnly":"npm run build"},"version":"0.7.1","_npmUser":{"name":"larsgw","email":"lars.willighagen@gmail.com"},"homepage":"https://github.com/larsgw/sync-fetch#readme","jsdelivr":"bundle.js","keywords":["fetch","sync"],"overrides":{"chai":"$chai"},"repository":{"url":"git+https://github.com/larsgw/sync-fetch.git","type":"git"},"_npmVersion":"11.19.1","description":"Synchronous version of the Fetch API","directories":{},"maintainers":[{"name":"larsgw","email":"lars.willighagen@gmail.com"}],"_nodeVersion":"24.14.0","dependencies":{"node-fetch":"^3.3.2","timeout-signal":"^2.0.0","whatwg-mimetype":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.2.2","mocha":"^12.0.1","parted":"^0.1.1","resumer":"0.0.0","standard":"^17.0.0","form-data":"^4.0.0","browserify":"^17.0.0","chai-string":"^1.6.0","chai-iterator":"^3.0.2","string-to-arraybuffer":"^1.0.2","conventional-changelog":"^8.1.3","@ungap/url-search-params":"^0.2.2","conventional-changelog-angular":"^9.4.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sync-fetch_0.7.1_1789431991593_0.5611907722514189"},"readme":"# sync-fetch\nSynchronous wrapper around the Fetch API. Uses [`node-fetch`](https://github.com/bitinn/node-fetch).\nFor a package using version of `fetch` built into Node.js, see [sync-fetch-undici](https://npmjs.com/package/sync-fetch-undici).\n\n[![npm](https://img.shields.io/npm/v/sync-fetch?style=flat-square)](https://npmjs.com/package/sync-fetch)\n[![npm monthly downloads](https://img.shields.io/npm/dm/sync-fetch?style=flat-square)](https://npm-stat.com/charts.html?package=sync-fetch)\n\n## Install\n\n    npm install sync-fetch\n\nIn the browser, a browserify bundle can be loaded from CDNs like unpkg.com.\n\n```html\n<script src=\"https://unpkg.com/sync-fetch\"></script>\n<script src=\"https://unpkg.com/sync-fetch@VERSION\"></script>\n```\n\n## Use\n\n```js\nconst fetch = require('sync-fetch')\n\nconst metadata = fetch('https://doi.org/10.7717/peerj-cs.214', {\n  headers: {\n    Accept: 'application/vnd.citationstyles.csl+json'\n  }\n}).json()\n// arrayBuffer(), blob(), buffer(), json(), and text() supported\n```\n\n## Limitations\n\n### Node.js\n\n  - Does not support `Stream` or `Blob` as input body since they cannot be read or serialized synchronously\n  - Does not support `FormData` as input body yet as it can contain a `Blob`\n  - Does not support `signal` as it cannot be implemented synchronously\n  - Does not support the non-spec `agent` option as its value cannot be serialized\n  - Does not support non-standard `textConverted()` method on `SyncResponse` and `SyncRequest`\n\n### Browser\n\n  - Does not support most options, since `XMLHttpRequest` is pretty limited. Supported are:\n    - `method`\n    - `body`\n    - `headers`\n    - `credentials` (but not `omit`)\n    - (Non-spec) `timeout`\n  - The non-standard `buffer()` and `textConverted()` methods are not supported\n  - CORS limitations apply, of course (note they may be stricter for synchronous requests)\n","publish_time":1789431991682,"_cnpm_publish_time":1789431991682,"dist-tags":{"latest":"0.7.1"}}