{"_id":"@umijs/use-params","_rev":"2805942","name":"@umijs/use-params","description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","dist-tags":{"latest":"1.0.9"},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"time":{"modified":"2022-09-06T14:01:04.000Z","created":"2021-02-10T16:36:53.563Z","1.0.9":"2021-11-22T14:41:25.913Z","1.0.8":"2021-11-22T14:33:34.960Z","1.0.7":"2021-10-20T09:32:47.981Z","1.0.6":"2021-08-25T05:08:33.787Z","1.0.5":"2021-08-19T02:22:08.595Z","1.0.4":"2021-08-06T06:53:10.960Z","1.0.3":"2021-02-11T02:34:31.471Z","1.0.2":"2021-02-11T02:33:03.500Z","1.0.1":"2021-02-11T02:16:07.636Z","1.0.0":"2021-02-10T16:36:53.563Z"},"users":{},"author":{"name":"rudyhuynh","email":"rudyhuynh@"},"repository":{"type":"git","url":"https://github.com/chenshuai2144/use-params"},"versions":{"1.0.9":{"name":"@umijs/use-params","version":"1.0.9","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/chenshuai2144/use-params/issues"},"repository":{"type":"git","url":"https://github.com/chenshuai2144/use-params"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","licenseText":"MIT License\n\nCopyright (c) 2019 Rudy Huynh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@umijs/use-params@1.0.9","dist":{"shasum":"0ae4a87f4922d8e8e3fb4495b0f8f4de9ca38c52","size":5873,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.9.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.9.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.9_1637592085521_0.19549522760126536"},"_hasShrinkwrap":false,"publish_time":1637592085913,"_cnpm_publish_time":1637592085913,"_cnpmcore_publish_time":"2021-12-16T10:35:22.546Z"},"1.0.8":{"name":"@umijs/use-params","version":"1.0.8","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/chenshuai2144/use-params/issues"},"repository":{"type":"git","url":"https://github.com/chenshuai2144/use-params"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","licenseText":"MIT License\n\nCopyright (c) 2019 Rudy Huynh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@umijs/use-params@1.0.8","dist":{"shasum":"0b3b40a39b0aa83e576e30ed02ed722d92858bd2","size":5848,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.8.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.8.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.8_1637591614808_0.5669690536732728"},"_hasShrinkwrap":false,"publish_time":1637591614960,"_cnpm_publish_time":1637591614960,"_cnpmcore_publish_time":"2021-12-16T10:35:22.796Z"},"1.0.7":{"name":"@umijs/use-params","version":"1.0.7","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/chenshuai2144/use-params/issues"},"repository":{"type":"git","url":"git+https://github.com/chenshuai2144/use-params.git"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"gitHead":"e979ba88064830587b6687103444daf92edf0cc1","description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","homepage":"https://github.com/chenshuai2144/use-params#readme","_id":"@umijs/use-params@1.0.7","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"shasum":"a8636906fb1a9df0ab3d71414af87bf0370b5f61","size":5701,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.7.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.7.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.7_1634722367845_0.10060133582847453"},"_hasShrinkwrap":false,"publish_time":1634722367981,"_cnpm_publish_time":1634722367981,"_cnpmcore_publish_time":"2021-12-16T10:35:23.016Z"},"1.0.6":{"name":"@umijs/use-params","version":"1.0.6","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/chenshuai2144/use-params/issues"},"repository":{"type":"git","url":"https://github.com/chenshuai2144/use-params"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","licenseText":"MIT License\n\nCopyright (c) 2019 Rudy Huynh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@umijs/use-params@1.0.6","dist":{"shasum":"c5b33725c88ae831c86c16edb9de2df7cfd65707","size":5738,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.6.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.6.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.6_1629868113643_0.0586001612961069"},"_hasShrinkwrap":false,"publish_time":1629868113787,"_cnpm_publish_time":1629868113787,"_cnpmcore_publish_time":"2021-12-16T10:35:23.207Z"},"1.0.5":{"name":"@umijs/use-params","version":"1.0.5","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/chenshuai2144/use-params/issues"},"repository":{"type":"git","url":"https://github.com/chenshuai2144/use-params"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","licenseText":"MIT License\n\nCopyright (c) 2019 Rudy Huynh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@umijs/use-params@1.0.5","dist":{"shasum":"1dce25ba6ba26425e2d9aa056cfff64d1b132edc","size":5627,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.5.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.5_1629339728455_0.25744610625935627"},"_hasShrinkwrap":false,"publish_time":1629339728595,"_cnpm_publish_time":1629339728595,"_cnpmcore_publish_time":"2021-12-16T10:35:23.397Z"},"1.0.4":{"name":"@umijs/use-params","version":"1.0.4","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/rudyhuynh/use-url-search-params/issues"},"repository":{"type":"git","url":"git+https://github.com/rudyhuynh/use-url-search-params.git"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"gitHead":"db8a1dc287682b8bbdb792c9b7889a59bd806fe4","description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","homepage":"https://github.com/rudyhuynh/use-url-search-params#readme","_id":"@umijs/use-params@1.0.4","_nodeVersion":"14.15.4","_npmVersion":"6.14.5","dist":{"shasum":"7b6a1d1d7cdac57217605a917e9576e4026c0de7","size":6319,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.4.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.4_1628232790623_0.6475347620906482"},"_hasShrinkwrap":false,"publish_time":1628232790960,"_cnpm_publish_time":1628232790960,"_cnpmcore_publish_time":"2021-12-16T10:35:23.612Z"},"1.0.3":{"name":"@umijs/use-params","version":"1.0.3","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/rudyhuynh/use-url-search-params/issues"},"repository":{"type":"git","url":"https://github.com/rudyhuynh/use-url-search-params.git"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","father-build":"^1.19.1","np":"^5.2.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","licenseText":"MIT License\n\nCopyright (c) 2019 Rudy Huynh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@umijs/use-params@1.0.3","dist":{"shasum":"d91d6be6846dc8765dfd81c53cee3953b33f1eb2","size":6526,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.3.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.3_1613010871362_0.38742404473861924"},"_hasShrinkwrap":false,"publish_time":1613010871471,"_cnpm_publish_time":1613010871471,"_cnpmcore_publish_time":"2021-12-16T10:35:23.876Z"},"1.0.2":{"name":"@umijs/use-params","version":"1.0.2","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/rudyhuynh/use-url-search-params/issues"},"repository":{"type":"git","url":"https://github.com/rudyhuynh/use-url-search-params.git"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","np":"^5.2.1","father-build":"^1.19.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","licenseText":"MIT License\n\nCopyright (c) 2019 Rudy Huynh\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@umijs/use-params@1.0.2","dist":{"shasum":"734d9f31022237bdcec2b6df144bb7679dd69478","size":6529,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.2.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.2_1613010783382_0.29751042060761024"},"_hasShrinkwrap":false,"publish_time":1613010783500,"_cnpm_publish_time":1613010783500,"_cnpmcore_publish_time":"2021-12-16T10:35:24.092Z"},"1.0.1":{"name":"@umijs/use-params","version":"1.0.1","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/rudyhuynh/use-url-search-params/issues"},"repository":{"type":"git","url":"git+https://github.com/rudyhuynh/use-url-search-params.git"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"lib/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc && father-build"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","np":"^5.2.1","father-build":"^1.19.1","typescript":"^4.0.0"},"peerDependencies":{"react":"*"},"gitHead":"fe241210d453596a7834d1e9f562f3521cf347c2","description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","homepage":"https://github.com/rudyhuynh/use-url-search-params#readme","_id":"@umijs/use-params@1.0.1","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"f138431dc617e2629e8dc4f9ec8a7a12f05755d4","size":6426,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.1.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.1_1613009767496_0.358551707157412"},"_hasShrinkwrap":false,"publish_time":1613009767636,"_cnpm_publish_time":1613009767636,"_cnpmcore_publish_time":"2021-12-16T10:35:24.303Z"},"1.0.0":{"name":"@umijs/use-params","version":"1.0.0","keywords":["react","react-hooks","urlsearchparams","url-query","url","state"],"bugs":{"url":"https://github.com/rudyhuynh/use-url-search-params/issues"},"repository":{"type":"git","url":"git+https://github.com/rudyhuynh/use-url-search-params.git"},"license":"MIT","author":{"name":"rudyhuynh","email":"rudyhuynh@"},"main":"es/index.js","module":"es/index.js","types":"es/index.d.ts","scripts":{"prepublish":"npm run build","build":"tsc"},"devDependencies":{"@types/react":"^17.0.1","@umijs/fabric":"^2.5.6","np":"^5.2.1","typescript":"^4.0.0"},"dependencies":{},"peerDependencies":{"react":"*"},"gitHead":"c8863edabf471bc75e9e35709a6653b6323ca032","description":"[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License)","homepage":"https://github.com/rudyhuynh/use-url-search-params#readme","_id":"@umijs/use-params@1.0.0","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"shasum":"2a67534f71950fed2fc67c92bf28bae9f8a2e01a","size":4508,"noattachment":false,"key":"/@umijs/use-params/-/@umijs/use-params-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@umijs/use-params/download/@umijs/use-params-1.0.0.tgz"},"_npmUser":{"name":"chenshuai2144","email":"wasd2144@hotmail.com"},"directories":{},"maintainers":[{"name":"chenshuai2144","email":""},{"name":"kuitos","email":""},{"name":"peachscript","email":""},{"name":"sorrycc","email":""},{"name":"xiaohuoni","email":""},{"name":"xierenyuan","email":""},{"name":"xusd320","email":""},{"name":"yifankakaxi","email":""},{"name":"zoomdong07","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/use-params_1.0.0_1612975013444_0.42150126107556174"},"_hasShrinkwrap":false,"publish_time":1612975013563,"_cnpm_publish_time":1612975013563,"_cnpmcore_publish_time":"2021-12-16T10:35:24.506Z"}},"readme":"# `useUrlSearchParams()`\n[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/rudyhuynh/use-url-search-params/blob/master/License) \n\n\nA React Hook to use [URL query string](https://en.wikipedia.org/wiki/Query_string) as a state management\n\n[Demo](https://rudyhuynh.github.io/use-url-search-params)\n\n## Why you need this\n\n- Your app need to persist its state after user refresh the page (used for simple, non-sensitive data).\n- Some page settings (ex: table filter, sorting, paging, etc.) should be saved in the URL so that user can easily pass to others. e.g. Tester can easily send a URL of a page to developer with very least reproduce steps.\n- You want to do something (request new data, etc.) every time some URL query value changes.\n- Combine all of the above with a URL query as a single source of truth.\n\n## Installation\n\n```\nnpm install use-url-search-params\n```\n\nor\n\n```\nyarn add use-url-search-params\n```\n\n## How to use\n\nFor most of the time you will do something like this:\n\n```js\nimport React from \"react\";\nimport { useUrlSearchParams } from \"use-url-search-params\";\n\nfunction App() {\n  // Your page URL will be like this by default: http://my.page?checked=true\n  const [params, setParams] = useUrlSearchParams({ checked: true });\n\n  React.useEffect(() => {\n    // do something when `params.checked` is updated.\n  }, [params.checked]);\n\n  return (\n    <div>\n      <input\n        type=\"checkbox\"\n        checked={params.checked}\n        onChange={e => setParams({ checked: e.target.checked })}\n      />\n    </div>\n  );\n}\n```\n\n## How to control the value parsed from URL query\n\nBy default, all values parsed from URL query are string. In case you want to get boolean or number value, pass a second argument to `useUrlSearchParams()` to specify data type you want to get from `params` object. Here is an example:\n\n```js\nconst initial = {\n  y: \"option1\"\n};\nconst types = {\n  x: Number,\n  y: Boolean,\n  z: Date,\n  t: [\"option1\", \"option2\", \"option3\"]\n};\nconst [params, setParams] = useUrlSearchParams(initial, types);\n\n// `params.x` will be number (or NaN)\n// `params.y` will be one of [undefined, true, false]\n// `params.z` will be instance of Date (can be Invalid Date)\n// `params.t` will be one of [\"option1\", \"option2\", \"option3\"] (can be `undefined` if not specified in `initial`)\n```\n\n## Complex data structure\n\nAlthough you can use `JSON.parse()` and `JSON.stringify()` to get/set arbitrary serializable data to URL query, it is not recommended. URL query is a good place to store and persist page settings as key/value pairs such as table filter, sorting, paging, etc. We should keep it that way for simplicity. **For complex data structure, you should consider using other state management for better performance, security and flexibility.**\n\n> **WARNING**: Be aware of XSS attack. Be careful to validate values from URL query before using it by either using `types` - the second parameter passed to `useUrlSearchParams()` or validate them yourself if neccessary.\n\nBut if you still insist, here is an example:\n\n```js\nfunction App() {\n  const [params, setParams] = useUrlSearchParams(\n    {},\n    {\n      complexData: dataString => {\n        try {\n          return JSON.parse(dataString);\n        } catch (e) {\n          return {};\n        }\n      }\n    }\n  );\n\n  const onSetParams = data => {\n    setParams({ complexData: JSON.stringify(data) });\n  };\n\n  return <div>{/*...*/}</div>;\n}\n```\n\n## React Router\n\nShould just work with React Router or any routing system. Just make sure that your component re-render whenever route changes.\n\n## API\n\n- **useUrlSearchParams([initial, types])**\n  - `initial` (optional | Object): To set default values for URL query string.\n  - `types` (optional | Object): Has similar shape with `initial`, help to resolve values from URL query string. Supported types:\n    - `String` (default)\n    - `Number`\n    - `Bool`\n    - `Date` - [`Date​.prototype​.toISOString()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) is used to parse date to string, e.g date string in your URL query is zero UTC offset\n    - Array of available string values (like enum)\n    - A custom resolver function\n\n## Read more (for maintainers)\n\nThis library is built base on [URLSearchParams interface](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)\n\n## License\n\nMIT\n","_attachments":{},"bugs":{"url":"https://github.com/chenshuai2144/use-params/issues"},"license":"MIT"}