{"name":"sync-fetch","version":"0.1.1","description":"Synchronous version of the Fetch API","main":"index.js","browser":"browser.js","scripts":{"lint":"standard","test":"mocha --throw-deprecation test/spec.js","build":"browserify -r .:sync-fetch -o bundle.js","preversion":"npm run lint && npm run test","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/larsgw/sync-fetch.git"},"keywords":["fetch","sync"],"author":{"name":"Lars Willighagen"},"license":"MIT","bugs":{"url":"https://github.com/larsgw/sync-fetch/issues"},"homepage":"https://github.com/larsgw/sync-fetch#readme","dependencies":{"buffer":"^5.4.2","node-fetch":"^2.6.0"},"devDependencies":{"@ungap/url-search-params":"^0.1.2","browserify":"^16.5.0","chai":"^4.2.0","chai-iterator":"^3.0.2","chai-string":"^1.5.0","form-data":"^2.5.0","mocha":"^6.2.0","parted":"^0.1.1","resumer":"0.0.0","standard":"^13.1.0","string-to-arraybuffer":"^1.0.2","sync-request":"^6.1.0","whatwg-url":"^7.0.0"},"engines":{"node":">=8"},"gitHead":"7726904216a5dedbd56a7eb4dffbf0a87fbbda0b","_id":"sync-fetch@0.1.1","_nodeVersion":"12.11.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-8AkbqoxM0d/b8NKm5HuIJiFas/BkDTvKGDXIvZ8phT+gdyaVxKbzfae4bvgKUXwOvYWGdWjMQxJFkJxC+9Ee9A==","shasum":"7fb85ac91eed81f3a164f8088d6dd146aa466071","tarball":"http://registry-npm.ywwl.com/sync-fetch/download/sync-fetch-0.1.1.tgz","fileCount":8,"unpackedSize":76579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsehBCRA9TVsSAnZWagAAWTkP/2+iCpOozHuJOk47H7s3\nB/qs3a+LntFCtr/2W4RFRTV8KbBtFY86Kho8POCYm/RO0F1NeVL55U+Exd0l\n5AY1f2tsSC9NGiUcdESb2fcL/uD8JSoR/DLJqBWV1PfW6RG6RtGXbi0lBY4U\nonRAsusiPO5HaUjodX1c5WIvCyvxziH/Lj6t7ar+1kzSHLluYRDv8Jb7RnBI\nYyZx9IeNX+inSlisc7jUq6yah4KcMsa/uEmuwEoj+nxSfv/SLrL/58+qfHES\nZEBBM2pu/Fa/bvzPxr3j+OL2y/B37T18IC7rC35uRw2+mTY6kKYZHT6m1FuH\n21n5uU+0CZqwaIB7QD7uZE96XLZRQghHHZwDgx23p+WL5HSaCVqDjpfg5Pgf\nJP3CmpYck2odT6G7iHUDNbJ3IuRxDZpRYqg1NzEFGMsZmQ5D+mhQa03R2qnI\nYhYd7JU6j0xYwq9psPsM4auM3/IaHHAZfzd7z5mGuX4PZhvuMvXjM/dDxEs2\ncYV6fT49pfcFfjCXyVLp7Rl/VdpxpJvKF4YX8h6ndgxtVlsobRGNcp6GUVjg\nAzOWO3P60kT7ZQ3bPaJhHaIYEc4kiWy/MC3YJFyx1A8WinWADRFeP3w7fW6M\nISPHNSyaozsMCxjy9cr36NjOuQ4mqK8HVRnXRn218owEXaf+Lcu3ddqhw0/y\n6Y94\r\n=sPZu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCDRSAjL09VP1EQR2dhR5ZWIFGc+XV2pxRwWoc09kXKwwIgE8Sm51C/dc6bzNeRWpGGPnIyzh2xkszrcILdzLS2oRk="}],"size":19916,"noattachment":false,"key":"/sync-fetch/-/sync-fetch-0.1.1.tgz"},"maintainers":[{"name":"larsgw","email":"lars.willighagen@gmail.com"}],"_npmUser":{"name":"larsgw","email":"lars.willighagen@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sync-fetch_0.1.1_1571940416836_0.9584255487672124"},"_hasShrinkwrap":false,"readme":"# sync-fetch\nSynchronous wrapper around the Fetch API. Uses [`node-fetch`](https://github.com/bitinn/node-fetch) under the hood, and for some input-parsing code and test cases too.\n\n[![npm](https://img.shields.io/npm/v/sync-fetch?style=flat-square)](https://npmjs.com/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    <script src=\"https://unpkg.com/sync-fetch\"></script>\n    <script src=\"https://unpkg.com/sync-fetch@VERSION\"></script>\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// json(), arrayBuffer(), text() and buffer() supported\n```\n\n## Limitations\n\n### Node.js\n\n  - Does not support `Stream`s (or `FormData`) as input bodies since they cannot be read or serialized synchronously\n  - Does not support `Blob`s as input bodies since they're too complex\n  - Does not support the non-spec `agent` option as its value cannot be serialized\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()` method is not supported\n  - CORS limitations apply, of course (note they may be stricter for synchronous requests)\n","publish_time":1571940417001,"_cnpm_publish_time":1571940417001,"dist-tags":{"latest":"0.7.1"}}