{"_id":"string-replace-async","_rev":"12-8c17efdba9a48989a90265ff8df79f90","name":"string-replace-async","description":"Asynchronous String.prototype.replace()","dist-tags":{"latest":"3.0.2"},"versions":{"1.0.0":{"name":"string-replace-async","version":"1.0.0","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitriy Sobolev","email":"disobolev@icloud.com","url":"github.com/dsblv"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","replace","regexp","match","async","asynchronous","promise"],"dependencies":{"escape-string-regexp":"^1.0.4"},"devDependencies":{"ava":"^0.11.0","xo":"^0.12.1"},"gitHead":"cec280f7551c8af0fae2f1424aa682022040d711","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@1.0.0","_shasum":"ce18afbe8f6f4a20df4de41d61670dbe13d89e20","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.1","_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"dist":{"shasum":"ce18afbe8f6f4a20df4de41d61670dbe13d89e20","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-1.0.0.tgz","integrity":"sha512-CFBXG4nxVLcZgVJPSzdKvJ4Go7ggUVwjOeWBobcLbUMjx0d2ooLDXTNwa2Q+ZjY/Wyhoi9KawArH+jKcqunJ9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQObD0G2hL54fSAt2t7tToyf7SJfCdN0MAI0qbxSCqDgIhAPSma+wOGJEo4vfEp7miRHB6qvHfyaQ3bWYwmE/ib9RN"}]},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"directories":{}},"1.1.0":{"name":"string-replace-async","version":"1.1.0","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitriy Sobolev","email":"disobolev@icloud.com","url":"github.com/dsblv"},"engines":{"node":">=0.12"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent","sequence"],"dependencies":{"escape-string-regexp":"^1.0.4","object-assign":"^4.0.1"},"devDependencies":{"ava":"^0.11.0","xo":"^0.12.1"},"gitHead":"b55925fd5fd16592d769f760e249e902ede53eef","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@1.1.0","_shasum":"9ae15c7d28f858641faf99961c21a577c58e93e0","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.1","_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"dist":{"shasum":"9ae15c7d28f858641faf99961c21a577c58e93e0","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-1.1.0.tgz","integrity":"sha512-eHXgEm1w1eDbqnW8ffRJHGJGZAZbk5sbTJELc8HkAI1LTr5wfIwcpADRIXfHh5ldziS250PM2sIQqwpQyk/OVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHjvzBft79Ow0Pi77OFmVijLbk2yb/a6MiGAIxPCgfyiAiBYRHRL7Hot8Er4k0Bpr6w1UrzHjkgOQt9k+ISEW7jK5g=="}]},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"directories":{}},"1.2.0":{"name":"string-replace-async","version":"1.2.0","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitriy Sobolev","email":"disobolev@icloud.com","url":"github.com/dsblv"},"engines":{"node":">=0.12"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent","sequence"],"dependencies":{"escape-string-regexp":"^1.0.4","object-assign":"^4.0.1"},"devDependencies":{"ava":"^0.11.0","xo":"^0.12.1"},"gitHead":"bf90e9bbc9dee68b2ca0593824d99600ad1fe4d2","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@1.2.0","_shasum":"0398d1d2d55a9c51c9b0f6a29d5a167e56c18cf1","_from":".","_npmVersion":"3.5.3","_nodeVersion":"4.2.1","_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"dist":{"shasum":"0398d1d2d55a9c51c9b0f6a29d5a167e56c18cf1","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-1.2.0.tgz","integrity":"sha512-8L5LU/0V5zQEBBGfnmVhis90LaTnlfqcMcmJ+NJoGL59Wgujj+zHFsu+GTw5y8s4YMZI+deEppvaZj/ivAOt9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjrIQP+YS7RlWX5fPMwPvu3uApziQyTmhe4ZxquFtcwAIhAL8kJV6IfkbLCCnk1KuuP63v1tPx7YicBsX233KOQlAG"}]},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/string-replace-async-1.2.0.tgz_1454399759541_0.10185057367198169"},"directories":{}},"1.2.1":{"name":"string-replace-async","version":"1.2.1","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitriy Sobolev","email":"disobolev@icloud.com","url":"github.com/dsblv"},"engines":{"node":">=0.12"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent","sequence"],"dependencies":{"escape-string-regexp":"^1.0.4","object-assign":"^4.0.1"},"devDependencies":{"ava":"^0.11.0","xo":"^0.12.1"},"gitHead":"de142584617d7e8b0146b45c28b420ca71434a8f","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@1.2.1","_shasum":"d52cdc7e338141bbeaea3471de31215028c9a3aa","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"dist":{"shasum":"d52cdc7e338141bbeaea3471de31215028c9a3aa","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-1.2.1.tgz","integrity":"sha512-wyGE0/LpII1t5/PxELrPaCEi/SsxL031mlUXccsHMke+YTTOIriryz/wLYnWSmzNcyDkGgZUbUf14OaTflPiGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2m9BRJ9ns1E/j6sUdiIDhAmBY/0zTTARO7zHWw/ihWgIgCXeP9+5dJdunq2IMnQgM6oONmNyEgXDYKjKh07d9HKU="}]},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-replace-async-1.2.1.tgz_1500554184095_0.17294588731601834"},"directories":{}},"2.0.0":{"name":"string-replace-async","version":"2.0.0","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitrii Sobolev","email":"disobolev@icloud.com","url":"https://github.com/dsblv"},"engines":{"node":">=0.12"},"scripts":{"test":"jest"},"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent"],"devDependencies":{"jest":"^26.0.1","prettier":"^2.0.5"},"gitHead":"9911612a4150a4afee55d67ae1023fd4e8324676","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@2.0.0","_nodeVersion":"13.12.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-AHMupZscUiDh07F1QziX7PLoB1DQ/pzu19vc8Xa8LwZcgnOXaw7yCgBuSYrxVEfaM2d8scc3Gtp+i+QJZV+spw==","shasum":"c3224e89d1216d6116e6e229cf74223cd84a733b","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-2.0.0.tgz","fileCount":5,"unpackedSize":6762,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/Lj/CRA9TVsSAnZWagAARmYP/Rfd8Yl7RFJCmXbt0uc6\n5Ao0UHV2DCQeMkwvUP9j6PtDf+FGFXQKeSHnVYCFnUZDxArydxk+Qgr7KjvQ\nvqs8Ec0FY2HrgFUvtSt6NRCbBBE3mGlAL3WpEQFtcEkdRHmXyPZncr0RX1GN\nEcdC7xsE+Irra4lsG4Jg5lEKkXEkB9DMPgnAQwNbqvsnmypEVZDxk9RhOEpO\nVfNE7gYKllVOtO83dWQJvcBvWHA6eehLnlclBAZ59tFY8xk41GYocR740JSe\nI6A5QOED/LbaaTNPs71BBxo8UO3bPeMICdBmK3SUlxSC57ny77WZoD4F4YV0\nPLuGCqWL5faXIA4FLl+xIf+h7mx8RjUANCIMSTrKn9Pdi/uwdF66QY2Gs3RO\nt2Yq9ppc90Z1KiaNY+OHuCguwwdduToaSsjIYKJNtCo5euNGxSzBIDTIWU3V\ne4q8VK12j7+xYK/lBYxZcQBD2VVLzflQlOxTIAUEWS6J54r3wZI0q+dJYyO+\nma2F+0V3bdj6GzC8Q1HgDA4Zs0vSjuAr7CedH4gcx5x0aasjDI2scpsSfGT+\nU6mvEFKzdhSE0YcTL5FFQFD58qgYh9wtaw/mGXSoVkFTm8VEse0ehehY3EBw\njpr+kAHv3EdCudkLPchBGcQz3I10VNPSgOR6ieuXw3qrQdZ6ftGMu8tT0Cj/\nMpgT\r\n=lF5o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFegwAUHlbTs2NPUDEu6hSq9VQfBJR0u0MJmBMGSVIKAiEA5EI8wpcs+UtOomygLtqLZEA3Nu1g/H7xJLOc4ViRwgc="}]},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-replace-async_2.0.0_1593620735388_0.9872398691510706"},"_hasShrinkwrap":false},"3.0.0":{"name":"string-replace-async","version":"3.0.0","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitrii Sobolev","email":"disobolev@icloud.com","url":"https://github.com/dsblv"},"type":"module","engines":{"node":">= 14.0.0"},"scripts":{"test":"jest"},"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent"],"devDependencies":{"jest":"^26.0.1","prettier":"^2.0.5"},"gitHead":"7a7b1c6c5db728c298ac12df05c4eaf7e0ec8805","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@3.0.0","_nodeVersion":"15.3.0","_npmVersion":"7.0.14","dist":{"integrity":"sha512-0lCtP7v4OAV0x2MDhiD1bVfILYKan7vgidDZicn3BMHCTM7Z0pB9zvfI3aCdhgZ6e0e+DG/xY1ayRJ2Wn4SsYA==","shasum":"2bb164fcec7bacb61be913203cfaea8fe97304eb","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-3.0.0.tgz","fileCount":5,"unpackedSize":7024,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKUQgCRA9TVsSAnZWagAAdvYP/jGATqX0KBp2kOiuKHkP\nkvLPR+lNRlYJfpnB6242fk5A54pCR6HtQ91wRmY70Y/0dy1C+iMfUSG88BNF\nx+EsztKFW1tI/4f1ytoqZK9NbF5t0BOnH2Mvh5nrWGKxJFxukGOxDD04y/fH\nBSL3wRf5VUlMmx26/VQqOmfP3E2uCqKMQeGNFvWa9ZI9VoPwYq22Vsw2F+NL\nZePspunyiB8FFEg6tUl/gyZGJBE4iyA6WfaHb5sCimPlbQPR7cMATyWzPDh9\n6ztrw+CbDrFUEQSTZ0GygkFNhiv0/F2ew+fXAyOdEd7fQy4k4b+l6MrMmnvS\nPtY4mq3h4n1FB/NdCH2tcVg3+K9fX+fzvW3wCmM2n7mA1wjKDhydkAbt+DlJ\nkwbUvz465vYmOX6bT2apwco3dbIxoabRK/v6Lhqu/zpE7VBwOZVURXWeLDoV\nFUPoTXt0ADG1QkH6E7eJonuTG5yI/9BwmD9SnnYQ3dh1K4D6fnljHSWLXYuw\nQ0IflLBDveYII9Xoc8OXQZ/Wxwe1M/vhQmMODNWWzadsXFeDSGYuzSZZcr8M\nYwA0cUS4QW0kucX3sJodAtwpM5MQuILVLrRFgy9EwgJz6+imkTfS0x7nGAda\nlWN0QSwKLMWKT0bNgKU8CfOK6WTnHyLMcfX23qBuQzkjyNHaDLEbrzpjxt1Z\nth0A\r\n=61E8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtfmAcAvI0MdJc/kL4CxFYX7+VA+rBdEzVHXX02bXmcwIhAPARJdp3DhCDW6yVXqA7WiidprpCtT7apFYonj/u9r77"}]},"_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"directories":{},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-replace-async_3.0.0_1630094368802_0.5354988102902702"},"_hasShrinkwrap":false},"3.0.1":{"name":"string-replace-async","version":"3.0.1","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitrii Sobolev","email":"disobolev@icloud.com","url":"https://github.com/dsblv"},"type":"module","main":"index.js","engines":{"node":">= 14.0.0"},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest"},"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent"],"devDependencies":{"jest":"^26.0.1","prettier":"^2.0.5"},"gitHead":"2721261e8f7871a5febf5dc438e945f9f4665b5c","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@3.0.1","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-wx23jxyyJ0LSCzyzR4DSGBBWAw0OBAhE94iZAUGi/2uZfKN/H0C1XhToe1L7ztX0GecmYj+AP2jWIL+f2jnvug==","shasum":"770f5c834015573eba03121c82691cf537a0b64d","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-3.0.1.tgz","fileCount":5,"unpackedSize":7085,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhKUlqCRA9TVsSAnZWagAANrIQAJ2aXSVxc9GTJaHR71qi\niA+teUFmXaCVd8eKr9N7//1NC9GcgQRDqMPVpCXFWIQPnJwHgwrF7jeZt7Ma\nTt6p5gnOn1MvNZ4uifJ7J9gNf87Cev0vDiUK5UrsyVOMeXphX1XGvNlkqvBD\n6QlLUsCeoRg4biMa29js4IiHnCVb4fBp9l3gVOjEM+WVHQ5zyapzZqo5mhTg\nq1lFpfJDn0T6fCTlqU+g79HMWFm/sOnYdLcgA686t5QJgtvUxsUP/R+xbgnF\nh4qM9wLIdew/L+oLqNJ4IayR7yMrC1mYuGIEzGRI4TsFKXz1xqrxxYbvTM9N\nSXIk0ZC1Rv1tiFCSfTbvw08r8ATtL0m+Rf3KbTxekdig+bHwexGglBr9chO2\noLBNLpASfpyMNSskOismvVXJPqpyFN+YgMRPbCEazk5SwFRc9Q3tMIccg+pY\nJ/TaNbu3h2HwlmZEkH5lVSNX4XgfVptXbZDJ/8VHF4ByzBpfVMVhegksr3Rm\nY8vrQeHDZHiSB22GEmTm/c6px5I4USi8zGazKTYIpq9vQ6ifV+LA/2GLJ+lo\nI9if0oRp8Ld4GaVdqZahCwkoSUaiBzpu237errNfwfih1jZ6ImHtGNcQKYlJ\nrwXhq2TnCRAh9kjeK9P5VR0kDrqCq1RXmPtcS0+9B7ftpeRbXQq4uXHbx88Z\nvCJF\r\n=lTBb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLp6nx1Nk2Z1GakLW8sZxM/vSiId3Oj2tXfF1cK+Q4oAiEAp/9SS9feMspiQKpO2vYsqfSd50Hngv6BWiWV/uLLRR0="}]},"_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"directories":{},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-replace-async_3.0.1_1630095722624_0.1744380715397087"},"_hasShrinkwrap":false},"3.0.2":{"name":"string-replace-async","version":"3.0.2","description":"Asynchronous String.prototype.replace()","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitrii Sobolev","email":"disobolev@icloud.com","url":"https://github.com/dsblv"},"type":"module","main":"index.js","engines":{"node":">= 14.0.0"},"scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules jest"},"keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent"],"devDependencies":{"jest":"^26.0.1","prettier":"^2.0.5"},"gitHead":"c5b3ce2c60fe598d269d2d05b3307607887ab8e2","bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"homepage":"https://github.com/dsblv/string-replace-async#readme","_id":"string-replace-async@3.0.2","_nodeVersion":"16.6.2","_npmVersion":"7.20.3","dist":{"integrity":"sha512-s6hDtXJ7FKyRap/amefqrOMpkEQvxUDueyvJygQeHxCK5Za90dOMgdibCCrPdfdAYAkr8imrZ1PPXW7DOf0RzQ==","shasum":"5aaa94b38dc57a3fd05a2d83cb4c989ba33663dd","tarball":"https://registry.npmjs.org/string-replace-async/-/string-replace-async-3.0.2.tgz","fileCount":5,"unpackedSize":7097,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOzqKCRA9TVsSAnZWagAAH18P/0SoIIIpgzA3Ot/eAtfD\netmqaXMPqD4qaKCQgL4sWfhBsNOkIpo6Mof+Uhn2Nhq6Gd5cBwL4fVdj23Wp\nKD2OJ5F5hqT7igVW+gHVQk6yc40mvyFjcPp7dyr8Fqm/nafZO1cdpSw43Di0\nO5Z3YeXThUBs0HHVAFYx8LpB/QXuclPJFL3UPMFSmVx5rqZqsKIHRxlK6ABS\n+oesXRiOW9rsphUlM3aGlCcDbgUpWR8Z5sL097720lIEDtUIBkjxp78eFRjo\nQo5z6Gxi5gmWIO7xCe2uJej/DLyGFDWgVpUbugotpmSTL9PlVTOghN25t4Hd\nh4t6U2FwaDQJNbNqbR8jFRURQ8DuKSQQR9xvXFPcjjwUy1LHC7PCON4nhESM\nOpzxgNeyQ7l8Z3VM9O89b/Xz6HevGaCYkBJhowtJ7JnQT5TNg3QyCgx+fZY8\nxBeKSnLSp7hB7/1jI/x4rtsLqSlUE+11AHI0VvWVYA6R4sDkrcevm/ZPAY3h\nzuzHt2Ha2kzpDFmTtrqN9o317aR981i+8hjY26nUNJqr4rmYtmFsFf8JlswP\nvXKX4WPA1MRrA3k2d0ByNyUaHQSL6UpV5OrV5kaKO+Rf8k6sQXypFos+Jb57\nXcu5V/P/oTeNENQsb89dHwBPVmmYlAGwzJ/GJQOzeE0KBV9zfuw/Lg4QC3tp\ngoRF\r\n=w21T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcT5eJ/W0pOnM9v06DOK3zsr1W9feqvJ4JOUM4sJWL5AiEAu4Kq7vJgeTuWw2G12iYS817EG7yHj49W0bT6SM3ZjQM="}]},"_npmUser":{"name":"dsblv","email":"disobolev@icloud.com"},"directories":{},"maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/string-replace-async_3.0.2_1631271562170_0.7108259869280109"},"_hasShrinkwrap":false}},"readme":"# string-replace-async\n\n> A vesion of \"string\".replace() that knows how to wait\n\n## Installation\n\n```\n$ npm install string-replace-async\n```\n\n**Note:** If you're using pre-14 version of Node or your node codebase isn't converted to [ES Modules](https://nodejs.org/api/esm.html#esm_introduction) yet, please use Version 2 specifically!\n\n```\n$ npm install string-replace-async@^2.0.0\n```\n\n## Usage\n\n```js\nimport replaceAsync from \"string-replace-async\";\n\nawait replaceAsync(\"#rebeccapurple\", /#(\\w+)/g, async (match, name) => {\n  let color = await getColorByName(name);\n  return \"#\" + color + \" (\" + name + \")\";\n});\n```\n\n## The Why\n\nSay you have a task of replacing color names with their respective hex codes.\n\n```js\nlet spec = \"I want background to be #papayawhip and borders #rebeccapurple.\";\n// make it \"I want background to be #FFEFD5 (papayawhip) and borders #663399 (rebeccapurple).\";\n```\n\nLuckily, strings in JavaScript have this handy `replace` method built in, so you use it.\n\n```js\nspec.replace(/#(\\w+)/g, (match, name) => {\n  let color = getColorByName(name);\n  return \"#\" + color + \" (\" + name + \")\";\n});\n```\n\nTime passes, a new requirement emerges: now you have to query a database for custom colors. This is an async operation, so naturally you convert `getColorByName` into async function.\n\nTurns out it has a cost: now all the code above should also be async. You try this:\n\n```js\nawait spec.replace(/#(\\w+)/g, async (match, name) => {\n  let color = await getColorByName(name);\n  return \"#\" + color + \" (\" + name + \")\";\n});\n```\n\nUnfortunately, this code doesn't work as you expect. **Built in menthod wasn't designed to work as async function.**\n\nThis is where `string-replace-async` comes in:\n\n```js\nawait replaceAsync(spec, /#(\\w+)/g, async (match, name) => {\n  let color = await getColorByName(name);\n  return \"#\" + color + \" (\" + name + \")\";\n});\n```\n\nYay!\n\n`string-replace-async` is nothing but direct `String.prototype.replace` replacement that awaits your function and returns a Promise for results.\n\n## API\n\nAPI is\n[String.prototype.replace()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace), except the first argument is a string itself.\n\n### replaceAsync(string, searchValue, replace)\n\nRuns `replace` and waits for it to resolve before replacing `searchValue` with results. If `searchValue` is a _global_ RegExp, `replace` will be called concurrently for every match.\n\n#### string\n\nType: `string`  \n_Required_\n\nAn input string.\n\n#### searchValue\n\nType: `regexp`, `string`\n\nAn expression to match substrings to replace.\n\n#### replace\n\nType: `function`, `string`\n\nA `function` that takes [several arguments](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter) and returns a `promise`. Resolved value will be used as _replacement substring_.\n\n## A Note on Concurrency\n\nPreviously this module had an additional function `seq()` that ran `replace` functions one by one instead of all at once. We decided to remove it to narrow our scope. Here's a snippet that achieves the same effect:\n\n```js\nlet sequence = Promise.resolve();\nlet seq = (fn) => (...args) => (sequence = sequence.then(() => fn(...args)));\n\nawait replaceAsync(\n  \"#rebeccapurple, #papayawhip\",\n  /#(\\w+)/g,\n  seq(async (match, name) => {\n    let color = await getColorByName(name);\n    return \"#\" + color + \" (\" + name + \")\";\n  })\n);\n```\n\n## License\n\nMIT © [Dmitrii Sobolev](http://github.com/dsblv)\n","maintainers":[{"name":"dsblv","email":"disobolev@icloud.com"}],"time":{"modified":"2022-06-27T01:02:53.508Z","created":"2016-01-29T09:32:51.571Z","1.0.0":"2016-01-29T09:32:51.571Z","1.1.0":"2016-01-29T13:28:09.501Z","1.2.0":"2016-02-02T07:56:02.063Z","1.2.1":"2017-07-20T12:36:25.067Z","2.0.0":"2020-07-01T16:25:35.507Z","3.0.0":"2021-08-27T19:59:28.937Z","3.0.1":"2021-08-27T20:22:02.737Z","3.0.2":"2021-09-10T10:59:22.324Z"},"homepage":"https://github.com/dsblv/string-replace-async#readme","keywords":["string","replace","regexp","match","async","asynchronous","promise","concurrent"],"repository":{"type":"git","url":"git+https://github.com/dsblv/string-replace-async.git"},"author":{"name":"Dmitrii Sobolev","email":"disobolev@icloud.com","url":"https://github.com/dsblv"},"bugs":{"url":"https://github.com/dsblv/string-replace-async/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"fiatjaf":true}}