{"_id":"@elliotdong/ajax-interceptor","_rev":"5-36e043046bef3ac51ed5a3b86b03cbf8","name":"@elliotdong/ajax-interceptor","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.0":{"name":"@elliotdong/ajax-interceptor","version":"0.0.0","description":"🪝 A lib for hook ajax, support XMLHTTPRequest and Fetch","keywords":["ajax","interceptor","hook","fetch","XMLHTTPRequest"],"homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"type":"module","types":"./dist/index.d.ts","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","watch":"vite watch"},"devDependencies":{"typescript":"^4.9.3","vite":"^4.0.0"},"gitHead":"a30bd774cbaea5266aed698b10a5823ee54128f6","_id":"@elliotdong/ajax-interceptor@0.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-exA+2IIMxP1cVP/J/2h16B9TvuK2pDwD36Xr0buEm6kLlbPcBbeCI3IRBX+JjDiU+ay+KJ9/8OPKrmXUTyCLcg==","shasum":"69941bf2ef56694f981b7594be251652d2554687","tarball":"https://registry.npmjs.org/@elliotdong/ajax-interceptor/-/ajax-interceptor-0.0.0.tgz","fileCount":10,"unpackedSize":17097,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAdkokfFv5KxjOfsiEoZVZWVcSeMdeKGRmm0LoQPOofSAiBm7UdluTJ/KmPcTgbESyXIWvBJOsULtJEpIGRcfYlnEA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjupW1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqAkhAAknY46SXIwYQFdRCwFwZgw1JvPgHvDdzYydKAzotbutOEROoZ\r\nxpDZ/sdkouV8w2a6xEGqCOIxegkgYdy+5xClvO6ChqcjfRvwVuZtivgdd+Kl\r\nO+5ueYd+JOYNHlKPYDBpS97QUNU8/hhl/tzYoB92oZ5gpbGlATQIy3wEMEZG\r\npGN1S1Iz4N4fNHXiqsW4/Qoaej7lyfZYGmDY8b+fI41seXIWOW7SmdggCPqX\r\nZPe/WvlojVE1Gc8hbbmSg9Ov2s6dGtAns5RO4UqWAHGfuBz5j3EYkploNbZU\r\nTEvN6iWBITzOK4IkoAq1jt18xiat2VMs1toE0l1SI2+xaA/Gruey0I3eaFIa\r\nqEx6mufkgdoFU5gfTUJ5NRm5lVXFkKxi4sXDw585zT3fyDFB5Evgs02Mwfv4\r\n/PUlzf0F0SpI6RaZ6pFSBLCL5dwZMisP5hoaIP1YJ7is+GAI2YcAamZdU7pA\r\nGWp9Ey+RNbjzoiGD9+nj82isTZszp4sd+ngw/PtS9wm5/oQlbmUATx5jAFsV\r\nmWloZcet1jlYWnQx8yen1wepmDIGx5cmK6335VjO9RyEj3IV0RwHEqqs+F70\r\nEMnSKBiPqe+r303bsY4VjLdJk7rDw6hjSa91B8+rQCWE31fokw5n65lmSCoh\r\nUykWipcBCmPqrpT+/s+lMeRMyrQ+gtxI7SE=\r\n=bRTw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yuhang-dong","email":"dong_yu_hang@126.com"},"directories":{},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax-interceptor_0.0.0_1673172405772_0.6732530004166881"},"_hasShrinkwrap":false},"0.0.1":{"name":"@elliotdong/ajax-interceptor","version":"0.0.1","description":"🪝 A lib for hook ajax, support XMLHttpRequest and Fetch","keywords":["ajax","interceptor","hook","fetch","XMLHTTPRequest"],"homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"type":"module","types":"./dist/index.d.ts","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"devDependencies":{"concurrently":"^7.6.0","typescript":"^4.9.3","vite":"^4.0.0","@changesets/cli":"^2.26.0"},"packageManager":"pnpm@7.12.2","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","build-watch":"concurrently \"tsc --watch \" \"vite build --watch\"","version":"changeset version && pnpm install --no-frozen-lockfile"},"_id":"@elliotdong/ajax-interceptor@0.0.1","_integrity":"sha512-F1di+iCjkQcwp8VpKvHVFTcW80voshDpjL4a12tCMVT0U8WS+rVnI+ktLgBa5+0H/3vYflypeUIHqupgphxkdg==","_resolved":"/tmp/eb4aa668fe111b3a618cf709e8e51bab/elliotdong-ajax-interceptor-0.0.1.tgz","_from":"file:elliotdong-ajax-interceptor-0.0.1.tgz","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-F1di+iCjkQcwp8VpKvHVFTcW80voshDpjL4a12tCMVT0U8WS+rVnI+ktLgBa5+0H/3vYflypeUIHqupgphxkdg==","shasum":"c7d7e9753f20f5a51b2fb3256b83e02be4eb2ea7","tarball":"https://registry.npmjs.org/@elliotdong/ajax-interceptor/-/ajax-interceptor-0.0.1.tgz","fileCount":10,"unpackedSize":30950,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnTB0qLYVzlI4GB/5TF24v3yoC98YPYt48YTROTV2COAIgWoEoM78AdT6NKb1gRkNyEyoJ7dcFD21a6sXyDOTc4dY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJju6f6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouFA/9GIYo5dDYZfYfHBbIUI6NBLdckCBQZ+8obVJVPORtIAYgdQVa\r\n9BHYT8yJbxyQiSjJE2Ats5Qq1iPkNEqWpAz/6nEbSy01mn4FFRDk343xlV3M\r\nVDjdI7dsTzkng8HK1gpP3o5SoDlMG7MHsNTj1BELTtDGE5WvxzLVh81EL9Wh\r\nyHGCpFICPDjYoAFcuYnRjHAtraOtldybVY1ZHejrpFqd+wBc3MkQJXXxChPP\r\nShCIxxHSMY2uts1l3Q9QnNxbSTZrnFaRYqb+un8LtD5TwurgmOr1Oe883JrM\r\nMti6SHjG64PHX3+tsruYeMnrjWELvI7zOBS+DtQFfX73K9eD90FfGLocTFIl\r\nb8qkbKKP1Z5xSXz9POKeskOYWTWgKahOaQyuNnNi71Iyi/kLjWbEb79Ta8tC\r\niy7aS36afJw/7jnym4vDRUMHguE30teGNe3WeDG0pSTSLVfZVXbQJLLvN1/0\r\nxh0xZ/wGn3Bh0rn1dkfx5OrGU0aZMbfDn0qm1cnCHNXLBsLt6UvYMBug+tqp\r\nwihbIbt3MiCmzB07QOqUXnfTtVcKFz8X39cuU6mO3Mj+sclH1Jw/igcs7NP3\r\nu9mMgQ3eJnYwY3bvPCLEGA1QNmjzX8axtXe+hE7DZM0Df6YvSfvVkx3ByGGp\r\nmQvCT9wMhgsCjj46LYaMuUvfxBKEgVM0PEw=\r\n=pcXp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yuhang-dong","email":"dong_yu_hang@126.com"},"directories":{},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax-interceptor_0.0.1_1673242618413_0.438555824334971"},"_hasShrinkwrap":false},"0.0.2":{"name":"@elliotdong/ajax-interceptor","version":"0.0.2","description":"🪝 A lib for hook ajax, support XMLHttpRequest and Fetch","keywords":["ajax","interceptor","hook","fetch","XMLHTTPRequest"],"homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"type":"module","types":"./dist/index.d.ts","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"devDependencies":{"concurrently":"^7.6.0","typescript":"^4.9.3","vite":"^4.0.0","@changesets/cli":"^2.26.0"},"packageManager":"pnpm@7.12.2","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","build-watch":"concurrently \"tsc --watch \" \"vite build --watch\"","version":"changeset version && pnpm install --no-frozen-lockfile"},"_id":"@elliotdong/ajax-interceptor@0.0.2","_integrity":"sha512-ajHhGEm5G4eXzy1HbojWYTl/hhr7pI+bXiLQ6EOGqxBDyD2LB+/aR+c0CLCsQb75sftjhyuqR60S7L83hRU5iw==","_resolved":"/tmp/d1c6c2680a43781aac4021de7ad9c8f8/elliotdong-ajax-interceptor-0.0.2.tgz","_from":"file:elliotdong-ajax-interceptor-0.0.2.tgz","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ajHhGEm5G4eXzy1HbojWYTl/hhr7pI+bXiLQ6EOGqxBDyD2LB+/aR+c0CLCsQb75sftjhyuqR60S7L83hRU5iw==","shasum":"4b8d746de55b67fc5d3dbf29b0315d89c4ffa272","tarball":"https://registry.npmjs.org/@elliotdong/ajax-interceptor/-/ajax-interceptor-0.0.2.tgz","fileCount":10,"unpackedSize":31206,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICEHU/Pg7lT6kvCp+s3LsCkdZdcdD15MwHkJBmVaVRu5AiEA5Or/5x6/+hk6GdoyG5YJj8N9zj4vlt4ZXaFts/L3EhE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvM6sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiVA//XxxVXUMWFb5a46dv9IVdF8N3+nr8o4YYW7P2zN78rABz6KUB\r\nrBLly+kfKQOrh0M2IVd8S+x6u049STDhsxOMZiGGqhlEgNknPh1dVsEw9P9d\r\nYze1DPCcWLalSENcQbK3MZZ9oHyFcI0aJwmuWYtF3I401FMmvs+FHz33pMqq\r\nlxo8CehLoDI7mPJvfCtVC82plCUEPg5O1WzZeiuFZAYJ28jGQCosNm7PyfxQ\r\nUeSBcZnCMIfMfiFSrevp62h2zHvLzL6xtxfndlBW51oMInJ2f/weA5tUT2Jl\r\nonG++u69V0Wt76F+9Vx4T1M7xsC2Lc785+Brl4cp43QbZvY6aDTejcqmKyXg\r\njwpnkL3DrSCxNEpKik10cgSE4ohmNnAodfUS0mLsJCjXgxTOPA8bIDryOJcp\r\noXVA8eVyP3Xo4LhtLD3DdC4jWdsVxgInz2d/WIOWPBNaiTY3i1AETWiZ8f2i\r\n+q7ACmBnRzkrVTd9pvxM9LiIfQ8oOhWs7rChFIyE93VrNSp1HNSbyWUmTJRU\r\nqwmEmJyardSWcSpsjdLs7BW3fus1sEi+fg3VqS5SA802ftLQClWQC3/Oghju\r\nWqWY9zbiutMn3Ivsq4SGnlqfiVy3jDK93R9a7MN0BAftDra/rGeBfxe63bp/\r\n4m6LFdouFAqva/gkOHCzvtL8ylHOgSr6hCo=\r\n=ndyx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yuhang-dong","email":"dong_yu_hang@126.com"},"directories":{},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax-interceptor_0.0.2_1673318060129_0.09954033335461121"},"_hasShrinkwrap":false},"0.1.0":{"name":"@elliotdong/ajax-interceptor","version":"0.1.0","description":"🪝 A lib for hook ajax, support XMLHttpRequest and Fetch","keywords":["ajax","interceptor","hook","fetch","XMLHTTPRequest"],"homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"type":"module","types":"./dist/index.d.ts","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"devDependencies":{"concurrently":"^7.6.0","typescript":"^4.9.3","vite":"^4.0.0","@changesets/cli":"^2.26.0"},"packageManager":"pnpm@7.12.2","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","build-watch":"concurrently \"tsc --watch \" \"vite build --watch\"","version":"changeset version && pnpm install --no-frozen-lockfile"},"_id":"@elliotdong/ajax-interceptor@0.1.0","_integrity":"sha512-K/Xha1GTTgCC5lUIbIs8Zox7wKSflXS8VJ930m9VT0m0ztqFvAkBqS6raHg9ev5RjrETC0sOVOlBvMDn5PNoJg==","_resolved":"/tmp/e9df19fdbced9d8dcdc1670cc9810f65/elliotdong-ajax-interceptor-0.1.0.tgz","_from":"file:elliotdong-ajax-interceptor-0.1.0.tgz","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-K/Xha1GTTgCC5lUIbIs8Zox7wKSflXS8VJ930m9VT0m0ztqFvAkBqS6raHg9ev5RjrETC0sOVOlBvMDn5PNoJg==","shasum":"a3dfbd8e07c4738cdaa8e14df0b5fb6e494c91cc","tarball":"https://registry.npmjs.org/@elliotdong/ajax-interceptor/-/ajax-interceptor-0.1.0.tgz","fileCount":10,"unpackedSize":30584,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjJK1636XFqMYN94QjCINjpGmDuzhriNIoTM9TqFlBnAiBkHo/VIfjGZW/hvmbHZtXfIaI5myt7eyMdGx/lYnZo/g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvTiWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/rBAAgX9uOB04WbJhzdrLVkt6VlaP7nHPZNf2okhMxg06f5SjUt+r\r\n4m9zcRbRewG3DoDrkYh4NzwgOP9fqw3k99huIIWJU4RdU4FqwwUkJk2cR8hz\r\nzNlmgbUvvqGIFtBN/IxGVKb7iA/PzKBGJ+flvJzUSWsm34wXSni/CfCqp3tf\r\n+Lw16rYY16kWc800NSCBU3b/64EknUtvRna2zhdM2AosM3WHnIEN9KUFH6OP\r\nli16WL2qILZ8cYJKE5/PdRmPG7aCgk8SEhtCcs+N25o81GsEG2ZI3sJYric+\r\nJO7+CgnYNHeJp/YzOGNKxwwaneNY8q1Y3VuKWuk4q3rSTaKtMCjIkc20idum\r\nyHZ39uWH2tAZwLP6c+5GeMQdCRBv6IaIZclyZgKvHbZz2Ami7YUsaFSvy8HI\r\nHjn4TRcOXUgMdsKYCJAA38LH4LzRHxuyjCnm+jz2XlkdwXW0o0cxPqydq9Ic\r\n9nfZq49nKI8A/S3Hu8s9fwOiL8ODlb0dl0zTNBf1LFivXT3FPU2SoJqBJiui\r\ngt49lFA+68z7U5GcrsCJ1SiqU1zygj6EnQdQ28DR+v2lrzSDI7QEm91rrD+Z\r\ntW1wxqCweZu9vphpFMEPW9VpxaC3YeEjlXvNVg6L0bALPOdZaQWVZFkliJlG\r\nGpPrp3v7++Em8K6mEiVLqlomLLFesn0Exbw=\r\n=m6qB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yuhang-dong","email":"dong_yu_hang@126.com"},"directories":{},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax-interceptor_0.1.0_1673345173886_0.6368078100035843"},"_hasShrinkwrap":false},"0.1.1":{"name":"@elliotdong/ajax-interceptor","version":"0.1.1","description":"🪝 A lib for hook ajax, support XMLHttpRequest and Fetch","keywords":["ajax","interceptor","hook","fetch","XMLHttpRequest"],"homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"type":"module","types":"./dist/index.d.ts","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"devDependencies":{"@changesets/cli":"^2.26.0","@playwright/test":"^1.29.2","axios":"^1.2.2","concurrently":"^7.6.0","typescript":"^4.9.3","vite":"^4.0.0"},"packageManager":"pnpm@7.12.2","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","build-watch":"concurrently \"tsc --watch \" \"vite build --watch\"","version":"changeset version && pnpm install --no-frozen-lockfile","test-server":"node bin/startTestServer","test":"playwright test"},"_id":"@elliotdong/ajax-interceptor@0.1.1","_integrity":"sha512-ZZa9ObiAdtlLCBZTKqxj+/2Ne3p36fqFo/bYiywGmGOiBrB8lL4Yg9Q8sCxQs+/fcNkEey6NsP2pmCAdFeyZDg==","_resolved":"/tmp/8c0982fc88960bbc1f6337b014481400/elliotdong-ajax-interceptor-0.1.1.tgz","_from":"file:elliotdong-ajax-interceptor-0.1.1.tgz","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-ZZa9ObiAdtlLCBZTKqxj+/2Ne3p36fqFo/bYiywGmGOiBrB8lL4Yg9Q8sCxQs+/fcNkEey6NsP2pmCAdFeyZDg==","shasum":"a07fa7262342dc1660609ffe0994f5beb386bf66","tarball":"https://registry.npmjs.org/@elliotdong/ajax-interceptor/-/ajax-interceptor-0.1.1.tgz","fileCount":10,"unpackedSize":33731,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHveDuDiIVkVd4ItDnhqTC6AIWSAHVIzfj49eRgXpiYhAiEA0QNp1ot/BBbMtDyngIrch4AOp6RwcUFWdOjhK48aFVo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv4t6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiDQ//RwIE7tA1grwlqhSTQ4Wa1mT4uL+UGGj02fT1AuKhL2ztnzH1\r\nA4cFfzQ6drbEToHMBWd47qD0sbAhGtsJEqgzwWPpwMwnG68IJA9K00jBHnsY\r\nSc053uweFWexzqlEirzvhJOlCpanS+FZ4IqIABfQoppMNke14oVMxVJRYT05\r\nDZIKtN/zoWUAaBOKvdJeLSUsOlQDEUzDHgqLzsv4KJJ/uy0fw3+S6GFnjwPx\r\nNO8fpmcPsOEjS0sjILPWyH7pTmw5b7LQG0iETrqmKY66ukN1gLKFfXAGCrnU\r\n3uOWjc2+VKCMI4ZF1Ut7x8owGHJINmzkc6qvHkvXuJZuMDRZGxu2u7mj5cY+\r\nbcnkXWfp5JmtqfxIAhPnC3ROAbtsfFXgEd1UEzyJNMgQq75Pamh1ZifBcN1H\r\nMFqobnABAHn5sS0HgfI1ZzEDZLDJN6+eQBsVu5FT6/FnUDzXltdnEOxCdnUs\r\ncWvoWleQoUON7SnT23auJZy5YYmyh1NGMZzlxwUomEvt707G8TLg5m0oG/JR\r\nHoMjtTjNuGd0nDQmc1cUPMihzHGqf2UXMYGQT/rHCJ9eHvfZr6noVRNAIQG1\r\n1e9WGgRXvWsUdQjm2GH7Fkfse5DZlp8MlFYJs74lpq1guQfPZFEYIJbJs19X\r\nAvjfJ74IxI9kngTdW2SStp7JnhzXxEzL6sk=\r\n=/lFw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yuhang-dong","email":"dong_yu_hang@126.com"},"directories":{},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax-interceptor_0.1.1_1673497466668_0.871126243412472"},"_hasShrinkwrap":false},"0.1.2":{"name":"@elliotdong/ajax-interceptor","version":"0.1.2","description":"🪝 A lib for hook ajax, support XMLHttpRequest and Fetch","keywords":["ajax","interceptor","hook","fetch","XMLHttpRequest"],"homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"type":"module","types":"./dist/index.d.ts","main":"./dist/index.cjs","module":"./dist/index.js","exports":{".":{"import":"./dist/index.js","require":"./dist/index.cjs"}},"devDependencies":{"@changesets/cli":"^2.26.0","@playwright/test":"^1.29.2","axios":"^1.2.2","concurrently":"^7.6.0","typescript":"^4.9.3","vite":"^4.0.0"},"packageManager":"pnpm@7.12.2","publishConfig":{"access":"public"},"scripts":{"dev":"vite","build":"tsc && vite build","preview":"vite preview","build-watch":"concurrently \"tsc --watch \" \"vite build --watch\"","version":"changeset version && pnpm install --no-frozen-lockfile","test-server":"node bin/startTestServer","test":"playwright test"},"_id":"@elliotdong/ajax-interceptor@0.1.2","_integrity":"sha512-tTZnMrok9J88/8pKHnnlLgZvT8TlDXSYNMPokAVamTfL0Re1Wb+5sHTBGDBWNv8swedISW/1ydVU9Z9aYIzZzg==","_resolved":"/tmp/e799b279b54bd0db5f2c1a8880f92cbf/elliotdong-ajax-interceptor-0.1.2.tgz","_from":"file:elliotdong-ajax-interceptor-0.1.2.tgz","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-tTZnMrok9J88/8pKHnnlLgZvT8TlDXSYNMPokAVamTfL0Re1Wb+5sHTBGDBWNv8swedISW/1ydVU9Z9aYIzZzg==","shasum":"62f4b05307829d852099ac6e41be4739ab0c5c51","tarball":"https://registry.npmjs.org/@elliotdong/ajax-interceptor/-/ajax-interceptor-0.1.2.tgz","fileCount":10,"unpackedSize":33745,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+w0HS6yvUj69gmoW8BNCwxAsYXAy+HYVwcA/5N4GB0AIhAMwd7kO7qK2oezDxVBt9tQWoiHhOz3o8U6y+59CZZR+n"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjwmRqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzgQ/7BCL++Aq/AKGyGbD4evZggDc1IKchK78pq2NeILfmjAztET93\r\nNE2DwnHjSvLZS5k1CrJxMUdi/kskc6BBjb8O4fukWNDdeXhLUy6SB5CMT/t/\r\nQhxACUvfRzzqfinpgQrVhIgtakgHJWNDxm65tQembf4mi0DuWRjtBsBHsKAe\r\n+kXAvSlg5Wzsd4VuLUlmTBND/7d/+ThF0dlVO6Ou5ME5KMuZaXQTrGbgYpGM\r\n00+095NUE02gOLkMOVCjfaUHFdYv/vV366SFweN5/1O6aSKYLvpDidRxj1bY\r\nWFTaGvxy9dZtCaoh8HuNjhS/KYgNZm5hNj7MnSKEzrqnVVve1zO2FhMxb4Dw\r\nSB3gCXpy5WCHfwHY/o1uGinQ6/ROkSZ2JPbY5i+wUcuDgC2peujsjcorJWod\r\nY3kvnVCCmUHI0mtU3KzJMGmD9Cgul0JIpZKCWqWnOwbDbGlBtKUqnVRONa4d\r\nU6iiJrRW+KPd4QWwQN7N28uctv5E8/yTQaYdwk8QMOsy/SvFUbjWAVK5+Wxb\r\nGHZNLBsto42aqiCmhOjM81j7PknTwMi99S0KdqqGrH2PrxGafulbJnEyZ4j5\r\nPJPTU/sTvqOZxX9Kg0QlnCMN6R7zcmca70QG1pmHHofy1vwbsmd6eAdmMKU7\r\njkB5Z0ZDz2u2PBOZFLAfaX9XT0buv60y2Io=\r\n=cHOh\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"yuhang-dong","email":"dong_yu_hang@126.com"},"directories":{},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ajax-interceptor_0.1.2_1673684074571_0.4054640597198107"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-08T10:06:45.706Z","0.0.0":"2023-01-08T10:06:45.955Z","modified":"2023-01-14T08:14:34.863Z","0.0.1":"2023-01-09T05:36:58.541Z","0.0.2":"2023-01-10T02:34:20.273Z","0.1.0":"2023-01-10T10:06:14.057Z","0.1.1":"2023-01-12T04:24:26.857Z","0.1.2":"2023-01-14T08:14:34.759Z"},"maintainers":[{"name":"yuhang-dong","email":"dong_yu_hang@126.com"}],"description":"🪝 A lib for hook ajax, support XMLHttpRequest and Fetch","homepage":"https://github.com/yuhang-dong/ajax-interceptor#readme","keywords":["ajax","interceptor","hook","fetch","XMLHttpRequest"],"repository":{"type":"git","url":"git+https://github.com/yuhang-dong/ajax-interceptor.git"},"author":{"name":"Elliot","email":"dong_yu_hang@126.com","url":"https://github.com/yuhang-dong"},"bugs":{"url":"https://github.com/yuhang-dong/ajax-interceptor/issues","email":"dong_yu_hang@126.com"},"license":"MIT","readme":"<p align=\"center\"><img src='./docs/icon.svg' width=\"474px\" height=\"98px\"/></p>\n\n---\n\n[![npm version](https://img.shields.io/npm/v/@elliotdong/ajax-interceptor?color=blue)](https://www.npmjs.org/package/@elliotdong/ajax-interceptor) [![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/mit-license.php) ![](https://img.shields.io/badge/TypeScript-support-orange.svg)   [![](https://img.shields.io/bundlephobia/minzip/@elliotdong/ajax-interceptor/latest)](https://unpkg.com/ajax-hook@2.0.0/dist/ajaxhook.core.min.js)\n\n---\n\n`ajax-interceptor` is a library to intercept `XMLHttpRequest` and `Fetch`. We can use it to change request header, method, even destination. It has the below props:\n\n* 🍃 **No Inject**. It doesn't change any business code, we can provide external script to intercept request.\n\n<img src='./docs/process.svg'/>\n\n## Usage\nYou can see the examples from [examples](./examples/)\n### Install\n\n* CDN Import\n    ```html\n    <script src=\"https://unpkg.com/@elliotdong/ajax-interceptor@latest/dist/index.umd.cjs\"></script>\n    ```\n    This will import a global object - interceptor.\n * NPM Install\n    ```\n    npm install @elliotdong/ajax-interceptor\n\n    // or\n\n    yarn add @elliotdong/ajax-interceptor\n\n    // or\n    pnpm install @elliotdong/ajax-interceptor\n    ```\n### API\n\n#### Start Intercept\n\n```js\n// CDN import\ninterceptor.intercept();\n\n```\n\n```js\n// npm install\nimport { intercept } from '@elliotdong/ajax-interceptor';\n\nintercept()\n```\n#### Stop Intercept\n```js\n// CDN import\ninterceptor.unIntercept();\n```\n\n```js\n// npm install\nimport { unIntercept } from '@elliotdong/ajax-interceptor';\nunIntercept();\n```\n#### Use BeforeRequest Interceptor\n```ts\nimport { addBeforeRequestInterceptor, defineRequestInit } from '@elliotdong/ajax-interceptor';\n\naddBeforeRequestInterceptor(async (requestInit: {\n    method?: string, // default: GET\n    url?: string,\n    body?: XMLHttpRequestBodyInit | null | Document,\n    credentials?: \"include\" | \"omit\" | \"same-origin\",\n    headers?: Record<string, string>;\n}) => {\n    console.log({requestInit});\n\n    if(requestInit.method === 'get') {\n        // if you want to change request, use `defineRequestInit`\n        return defineRequestInit({\n            method?: string,\n            url?: string,\n            body?: XMLHttpRequestBodyInit | null | Document,\n            credentials?: RequestCredentials,\n            headers?: Record<string, string>;\n        })\n    }\n    // or not, return void\n})\n```\n\n#### Use AfterResponse Interceptor\n```ts\nimport { addAfterResponseInterceptor, defineResponse } from '@elliotdong/ajax-interceptor';\n\naddAfterResponseInterceptor(async (response: {\n    headers?: Record<string, string>;\n    status?: number;\n    statusText?: string;\n    response?: Blob;\n}, requestInit) => {\n    console.log({response});\n\n    // if you want to change request, use `defineResponse`\n    return defineResponse({\n        method?: string,\n        url?: string,\n        body?: XMLHttpRequestBodyInit | null | Document,\n        credentials?: RequestCredentials,\n        headers?: Record<string, string>;\n    })\n\n})\n```\n#### Use ReceiveError Interceptor\n```ts\nimport { addReceiveErrorInterceptor, defineResponse } from '@elliotdong/ajax-interceptor';\n\naddReceiveErrorInterceptor(async (error: {\n    type: 'error' | 'timeout' | 'abort' | 'fetch',\n    cause?: Error\n}, requestInit) => {\n    console.log({response});\n\n    if(requestInit.url.startWith('www.baidu.com')) {\n        // if you want to change err to response, use `defineResponse`\n        return defineResponse({\n            method?: string,\n            url?: string,\n            body?: XMLHttpRequestBodyInit | null | Document,\n            credentials?: RequestCredentials,\n            headers?: Record<string, string>;\n        })\n    }\n    \n\n})\n```\n\n### TODO\n\ntest","readmeFilename":"README.md"}