{"name":"sync-fetch","version":"0.3.0","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.7.0","node-fetch":"^2.6.1"},"devDependencies":{"@ungap/url-search-params":"^0.2.2","browserify":"^17.0.0","chai":"^4.2.0","chai-iterator":"^3.0.2","chai-string":"^1.5.0","form-data":"^3.0.0","mocha":"^8.2.0","parted":"^0.1.1","resumer":"0.0.0","standard":"^16.0.1","string-to-arraybuffer":"^1.0.2","sync-request":"^6.1.0","whatwg-url":"^8.4.0"},"engines":{"node":">=8"},"gitHead":"59ea2edc3d331bf63c4e62b242e2fbdd9c9b9b7e","_id":"sync-fetch@0.3.0","_nodeVersion":"12.14.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-dJp4qg+x4JwSEW1HibAuMi0IIrBI3wuQr2GimmqB7OXR50wmwzfdusG+p39R9w3R6aFtZ2mzvxvWKQ3Bd/vx3g==","shasum":"77246da949389310ad978ab26790bb05f88d1335","tarball":"http://registry-npm.ywwl.com/sync-fetch/download/sync-fetch-0.3.0.tgz","fileCount":8,"unpackedSize":126583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfn8HYCRA9TVsSAnZWagAADkcP/3e0YkwAFLrTHfxudcVq\nTL9cxaID96U1wvK1bQpfDlt/hkVNgxhVspjABLvOBge/xVScNHXYyfMwe8f0\nolQwZpTv73BbaXjids3aJVZJw1AY1XD/wy55PuMvxfijSrZtAHr+3BOEVVTd\nq6551HrEUpVdrUFvsG3MwIN5iewKq9JEUVe4TC5wUUF5xBigN5cWgkh4oyHL\nKfrqq02VHR9eSIZRfuD8pDuP/RwpQ3U1DJFh7f1yWuqq9xykj5CWUIyNvH/J\ni4N04AeJvtk5pXUkjPkFdtqES7RBov1Q4wocUeL5XrSBofzYc+snQeR59zlW\nBncDr3V/KQz84lCZAub7f3qDfSMxHzcxo8tCRh4YIUfipjayhGg66r6VXGcT\n+RRCU2Ugfcy2J6C+EDziQ7/DyVbzjYKLPp2LYXqsWYBf84CZ/wOqubHPZ9Bp\njFK5IMUCyGt6H+EwFrRuZEgVNjk5OuE7VJmxLGrFwAdU6kE/RIlbIw5qTZbA\noR+iXQ95Yai8qm6XSo55g2cM/AIS5siNkS4nrG0Ui95E6DXMVUGF3ykkEoSY\ng1Aiz4E4sUUQDj8v+z3kDHJrj/FVmyy6cCKjCkEbaR4UuQT2jyuKEleigzur\nvSSOyGZllaRuHtyXAvLAGRyvTQeZ4wKZ+oLQNK0vQI/QZ6Uz39ovnt2IvDBd\nwYF4\r\n=lcuc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+rsrmtWw21opFbCdVQ1nj6wuWhw01hY8w/2yM+ARhRwIgQLG8oLQ57EhMEHpasie2OEY5PVNxmTxNI4A8JJAvdAk="}],"size":30779,"noattachment":false,"key":"/sync-fetch/-/sync-fetch-0.3.0.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.3.0_1604305367636_0.008488102869375957"},"_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":1604305367765,"_cnpm_publish_time":1604305367765,"dist-tags":{"latest":"0.7.1"}}