{"_id":"try-to-catch","_rev":"4132484","name":"try-to-catch","description":"function try-catch wrapper for promises","dist-tags":{"latest":"4.0.5"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"time":{"modified":"2026-03-01T18:38:48.000Z","created":"2018-02-12T11:54:44.004Z","4.0.5":"2026-01-31T20:32:09.060Z","4.0.4":"2026-01-28T17:12:10.340Z","4.0.3":"2026-01-04T20:39:03.777Z","4.0.2":"2025-12-31T12:04:40.183Z","4.0.1":"2025-12-31T11:56:25.897Z","4.0.0":"2025-12-31T11:17:37.074Z","3.0.1":"2022-03-09T17:01:59.508Z","3.0.0":"2020-02-24T14:39:20.704Z","2.0.1":"2019-12-30T14:26:57.192Z","2.0.0":"2019-10-16T19:07:10.365Z","1.1.1":"2018-11-08T19:48:11.283Z","1.1.0":"2018-11-08T19:18:43.148Z","1.0.2":"2018-02-13T12:44:42.370Z","1.0.1":"2018-02-12T12:45:14.854Z","1.0.0":"2018-02-12T11:54:44.004Z"},"users":{},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"versions":{"4.0.5":{"name":"try-to-catch","version":"4.0.5","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","exports":{".":"./lib/try-to-catch.js"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"c8":"^10.1.3","eslint":"^9.39.2","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^29.2.0","madrun":"^11.0.6","nodemon":"^3.1.11","putout":"^41.2.3","supertape":"^11.5.1"},"engines":{"node":">=22"},"license":"MIT","_id":"try-to-catch@4.0.5","gitHead":"2597ac75c07506bc937d84609da50b6706c02d98","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_nodeVersion":"25.5.0","_npmVersion":"11.4.2","dist":{"shasum":"98b55c9e46d3155f600683abc2ae658af4b51f56","size":2800,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-4.0.5.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-4.0.5.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/try-to-catch_4.0.5_1769891528914_0.257424933352177"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-31T20:32:09.060Z","publish_time":1769891529060,"_source_registry_name":"default","_cnpm_publish_time":1769891529060},"4.0.4":{"name":"try-to-catch","version":"4.0.4","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","exports":{".":"./lib/try-to-catch.js"},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"c8":"^10.1.3","eslint":"^9.39.2","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^29.2.0","madrun":"^11.0.6","nodemon":"^3.1.11","putout":"^41.2.3","supertape":"^11.5.1"},"engines":{"node":">=22"},"license":"MIT","_id":"try-to-catch@4.0.4","gitHead":"64443c41b8bd7ce61cc2bd23bb38ce8f6883bb1b","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_nodeVersion":"25.3.0","_npmVersion":"11.4.2","dist":{"shasum":"aea9ee924a7d0e39e7e2bf86882a565061e5fb21","size":78902,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-4.0.4.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-4.0.4.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/try-to-catch_4.0.4_1769620330158_0.5235056480609477"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-28T17:12:10.340Z","publish_time":1769620330340,"_source_registry_name":"default","_cnpm_publish_time":1769620330340},"4.0.3":{"name":"try-to-catch","version":"4.0.3","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.cjs","exports":{".":{"require":"./lib/try-to-catch.cjs","import":"./lib/try-to-catch.js"}},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"c8":"^10.1.3","eslint":"^9.39.2","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^29.2.0","madrun":"^11.0.6","nodemon":"^3.1.11","putout":"^41.2.3","supertape":"^11.5.1"},"engines":{"node":">=22"},"license":"MIT","_id":"try-to-catch@4.0.3","gitHead":"f627f7d0af6886a42985d2c4c7004d6fd96b9437","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.4.2","dist":{"shasum":"e29ef0c7ffe25c2376e9683e8cd90ebcc8791606","size":78991,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-4.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-4.0.3.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/try-to-catch_4.0.3_1767559143614_0.26749739996985933"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-04T20:39:03.777Z","publish_time":1767559143777,"_source_registry_name":"default","_cnpm_publish_time":1767559143777},"4.0.2":{"name":"try-to-catch","version":"4.0.2","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.cjs","exports":{".":{"node":{"require":"./lib/try-to-catch.cjs","import":"./lib/try-to-catch.js"},"default":"./lib/try-to-catch.cjs"}},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"c8":"^10.1.3","eslint":"^9.39.2","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^29.2.0","madrun":"^11.0.6","nodemon":"^3.1.11","putout":"^41.2.3","supertape":"^11.5.1"},"engines":{"node":">=22"},"license":"MIT","_id":"try-to-catch@4.0.2","gitHead":"0172c9b7d95f9b62533ec90462f44eb3b31d5aca","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_nodeVersion":"22.21.1","_npmVersion":"11.4.2","dist":{"shasum":"c897c6c890e69819561ec2ec49a2162be1369785","size":78980,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-4.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-4.0.2.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/try-to-catch_4.0.2_1767182680025_0.0857306494459027"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-31T12:04:40.183Z","publish_time":1767182680183,"_source_registry_name":"default","_cnpm_publish_time":1767182680183},"4.0.1":{"name":"try-to-catch","version":"4.0.1","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.cjs","exports":{".":{"node":{"require":"./lib/try-to-catch.cjs","import":"./lib/try-to-catch.js"},"default":"./lib/try-to-catch.cjs"}},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"c8":"^10.1.3","eslint":"^9.39.2","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^29.2.0","madrun":"^11.0.6","nodemon":"^3.1.11","putout":"^41.2.3","supertape":"^11.5.1"},"engines":{"node":">=20"},"license":"MIT","_id":"try-to-catch@4.0.1","gitHead":"c792c0b70d58880d3f76c43254373b4b2f4b844c","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_nodeVersion":"22.21.1","_npmVersion":"11.4.2","dist":{"shasum":"0fc225c89a96c35c4bdfcb9bbff947a1e16ecbc7","size":78938,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-4.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-4.0.1.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/try-to-catch_4.0.1_1767182185721_0.6051973213569772"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-31T11:56:25.897Z","publish_time":1767182185897,"_source_registry_name":"default","_cnpm_publish_time":1767182185897},"4.0.0":{"name":"try-to-catch","version":"4.0.0","type":"module","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.cjs","exports":{".":{"node":{"require":"./lib/try-to-catch.cjs","import":"./lib/try-to-catch.js"},"default":"./lib/try-to-catch.cjs"}},"repository":{"type":"git","url":"git+https://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"c8":"^10.1.3","eslint":"^9.39.2","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^29.2.0","madrun":"^11.0.6","nodemon":"^3.1.11","putout":"^41.2.3","supertape":"^11.5.1"},"engines":{"node":">=20"},"license":"MIT","_id":"try-to-catch@4.0.0","gitHead":"159f862494541d23925582d2e798298574e699d9","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.4.2","dist":{"shasum":"b9d2ffc2830f957f9728340d7579e2d575a685b6","size":2781,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-4.0.0.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/try-to-catch_4.0.0_1767179856937_0.5667525725035041"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-12-31T11:17:37.074Z","publish_time":1767179857074,"_source_registry_name":"default","_cnpm_publish_time":1767179857074},"3.0.1":{"name":"try-to-catch","version":"3.0.1","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"coveralls":"^3.0.0","eslint":"^8.10.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^14.4.0","madrun":"^9.0.0","nodemon":"^2.0.2","nyc":"^15.0.0","putout":"^25.4.1","supertape":"^7.2.0"},"engines":{"node":">=6"},"license":"MIT","gitHead":"cf2d7392147a5c6a6dde2623310c961d3528c8bb","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@3.0.1","_nodeVersion":"16.14.0","_npmVersion":"7.12.0","dist":{"shasum":"81ccacb2abd9ef0f313a99eae7752fccf1d17c09","size":2416,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-3.0.1.tgz"},"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_3.0.1_1646845319357_0.9812901819014912"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-03-09T17:04:44.355Z","publish_time":1646845319508,"_cnpm_publish_time":1646845319508},"3.0.0":{"name":"try-to-catch","version":"3.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"coveralls":"^3.0.0","eslint":"^6.1.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","madrun":"^5.4.0","nodemon":"^2.0.2","nyc":"^15.0.0","putout":"^7.3.4","supertape":"^1.2.4"},"engines":{"node":">=6"},"license":"MIT","gitHead":"0da1c82aa0de847847dd6dfb8d475ae04e561e78","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@3.0.0","_nodeVersion":"13.9.0","_npmVersion":"6.12.1","dist":{"shasum":"a1903b44d13d5124c54d14a461d22ec1f52ea14b","size":2438,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-3.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_3.0.0_1582555160594_0.44148117238717877"},"_hasShrinkwrap":false,"publish_time":1582555160704,"_cnpm_publish_time":1582555160704,"_cnpmcore_publish_time":"2021-12-16T15:40:08.410Z"},"2.0.1":{"name":"try-to-catch","version":"2.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","coveralls":"^3.0.0","eslint":"^6.1.0","eslint-plugin-node":"^11.0.0","eslint-plugin-putout":"^3.0.0","madrun":"^5.4.0","nodemon":"^2.0.2","nyc":"^15.0.0","putout":"^7.3.4","supertape":"^1.2.4"},"engines":{"node":">=6"},"license":"MIT","gitHead":"10de68440146c013af84dc275b544850929b435e","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@2.0.1","_nodeVersion":"13.5.0","_npmVersion":"6.12.1","dist":{"shasum":"4a943ba6f2921bd3ba945ea5d4459119ec3ec079","size":2480,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-2.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_2.0.1_1577716017086_0.6501558536579823"},"_hasShrinkwrap":false,"publish_time":1577716017192,"_cnpm_publish_time":1577716017192,"_cnpmcore_publish_time":"2021-12-16T15:40:08.646Z"},"2.0.0":{"name":"try-to-catch","version":"2.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","coveralls":"^3.0.0","eslint":"^6.1.0","madrun":"^3.0.6","nodemon":"^1.14.12","nyc":"^14.1.1","putout":"^6.15.1","redrun":"^7.0.2","supertape":"^1.2.3"},"engines":{"node":">=4"},"license":"MIT","gitHead":"31ee9699e34b5c0cff8fc31c52f3fd4142ab5af7","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@2.0.0","_nodeVersion":"12.12.0","_npmVersion":"6.11.3","dist":{"shasum":"ca2b4cf47b6fbc6206dacdb979cb7af9eda71942","size":2432,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-2.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_2.0.0_1571252830219_0.8470691154303942"},"_hasShrinkwrap":false,"publish_time":1571252830365,"_cnpm_publish_time":1571252830365,"_cnpmcore_publish_time":"2021-12-16T15:40:08.909Z"},"1.1.1":{"name":"try-to-catch","version":"1.1.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"tape 'test/*.js'","watch:test":"nodemon -w lib -w test -x \"npm test\"","lint":"eslint lib test","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","build":"babel lib -d legacy","wisdom":"redrun build legacy","legacy":"echo \"module.exports = require('./try-to-catch')\" > legacy/index.js"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","coveralls":"^3.0.0","eslint":"^5.6.0","nodemon":"^1.14.12","nyc":"^13.0.1","redrun":"^7.0.2","tape":"^4.8.0","try-to-tape":"^1.0.0"},"license":"MIT","gitHead":"dba8906466a52c51b7471e7c05c363a76fb899a6","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"770162dd13b9a0e55da04db5b7f888956072038a","size":2994,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-1.1.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_1.1.1_1541706491158_0.75607698209243"},"_hasShrinkwrap":false,"publish_time":1541706491283,"_cnpm_publish_time":1541706491283,"_cnpmcore_publish_time":"2021-12-16T15:40:09.117Z"},"1.1.0":{"name":"try-to-catch","version":"1.1.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"tape 'test/*.js'","watch:test":"nodemon -w lib -w test -x \"npm test\"","lint":"eslint lib test","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","build":"babel lib -d legacy","wisdom":"redrun build legacy","legacy":"echo \"module.exports = require('./try-to-catch')\" > legacy/index.js"},"dependencies":{"wraptile":"^2.0.0"},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","coveralls":"^3.0.0","eslint":"^5.6.0","nodemon":"^1.14.12","nyc":"^13.0.1","redrun":"^7.0.2","tape":"^4.8.0"},"license":"MIT","gitHead":"a7b2afeceb25ad1866333f077355136fb04d3d76","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"a4a1c68f6468ed2046c83be9734b1ccc727919a4","size":3003,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-1.1.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_1.1.0_1541704723033_0.6804509125373002"},"_hasShrinkwrap":false,"publish_time":1541704723148,"_cnpm_publish_time":1541704723148,"_cnpmcore_publish_time":"2021-12-16T15:40:09.458Z"},"1.0.2":{"name":"try-to-catch","version":"1.0.2","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"tape 'test/*.js'","watch:test":"nodemon -w lib -w test -x \"npm test\"","lint":"eslint lib test","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","build":"babel lib -d legacy","wisdom":"redrun build legacy","legacy":"echo \"module.exports = require('./try-to-catch')\" > legacy/index.js"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.17.0","nodemon":"^1.14.12","nyc":"^11.4.1","redrun":"^5.10.2","tape":"^4.8.0"},"license":"MIT","gitHead":"60bc797a2cbc041c29bf0c0a801f3ce6554e545b","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"8c9d48f233c4d1679452e9edc8d5e85f653010f1","size":2624,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-1.0.2.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_1.0.2_1518525881654_0.05874631255927332"},"_hasShrinkwrap":false,"publish_time":1518525882370,"_cnpm_publish_time":1518525882370,"_cnpmcore_publish_time":"2021-12-16T15:40:09.651Z"},"1.0.1":{"name":"try-to-catch","version":"1.0.1","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"tape 'test/*.js'","watch:test":"nodemon -w lib -w test -x \"npm test\"","lint":"eslint lib test","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","build":"babel lib -d legacy","wisdom":"redrun build legacy","legacy":"echo \"require('./try-to-catch')\"> legacy/index.js"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch","then"],"devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.17.0","nodemon":"^1.14.12","nyc":"^11.4.1","redrun":"^5.10.2","tape":"^4.8.0"},"license":"MIT","gitHead":"5091ca7fcfdd64db8303a117f7d2dfc261644b50","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"1d5f2f3beafd91dbf2c41c288b1bf807ceb284ca","size":2572,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-1.0.1.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_1.0.1_1518439514158_0.7642359976987774"},"_hasShrinkwrap":false,"publish_time":1518439514854,"_cnpm_publish_time":1518439514854,"_cnpmcore_publish_time":"2021-12-16T15:40:09.869Z"},"1.0.0":{"name":"try-to-catch","version":"1.0.0","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"function try-catch wrapper for promises","homepage":"http://github.com/coderaiser/try-to-catch","main":"lib/try-to-catch.js","repository":{"type":"git","url":"git://github.com/coderaiser/try-to-catch.git"},"scripts":{"test":"tape 'test/*.js'","watch:test":"nodemon -w lib -w test -x \"npm test\"","lint":"eslint lib test","coverage":"nyc npm test","report":"nyc report --reporter=text-lcov | coveralls","build":"babel lib -d legacy","wisdom":"redrun build legacy","legacy":"echo \"require('./try-to-catch')\"> legacy/index.js"},"dependencies":{},"keywords":["try","catch","function","promise","async","await","try-catch"],"devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","coveralls":"^3.0.0","eslint":"^4.17.0","nodemon":"^1.14.12","nyc":"^11.4.1","redrun":"^5.10.2","tape":"^4.8.0"},"license":"MIT","gitHead":"f53f26af890956a4ebafbf05d1e204502e9e0f7b","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"_id":"try-to-catch@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"},"dist":{"shasum":"643ad032ff79dbbe962e796109305f6f8260f968","size":2512,"noattachment":false,"key":"/try-to-catch/-/try-to-catch-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/try-to-catch/download/try-to-catch-1.0.0.tgz"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/try-to-catch_1.0.0_1518436483324_0.5633688495231324"},"_hasShrinkwrap":false,"publish_time":1518436484004,"_cnpm_publish_time":1518436484004,"_cnpmcore_publish_time":"2021-12-16T15:40:10.094Z"}},"readme":"# Try to Catch [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/try-to-catch.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/try-to-catch \"npm\"\n[CoverageURL]: https://coveralls.io/github/coderaiser/try-to-catch?branch=master\n[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/try-to-catch/badge.svg?branch=master&service=github\n[BuildStatusURL]: https://github.com/coderaiser/try-to-catch/actions?query=workflow%3A%22Node+CI%22 \"Build Status\"\n[BuildStatusIMGURL]: https://github.com/coderaiser/try-to-catch/workflows/Node%20CI/badge.svg\n\nFunctional `try-catch` wrapper for `promises`.\n\n## Install\n\n```\nnpm i try-to-catch\n```\n\n## API\n\n### tryToCatch(fn, [...args])\n\nWrap function to avoid `try-catch` block, resolves `[error, result]`;\n\n### Example\n\nSimplest example with `async-await`:\n\n```js\nimport {tryToCatch} from 'try-to-catch';\n\nconst reject = Promise.reject.bind(Promise);\nawait tryToCatch(reject, 'hi');\n// returns\n// [ Error: hi]\n```\n\nCan be used with functions:\n\n```js\nimport {tryToCatch} from 'try-to-catch';\n\nawait tryToCatch(() => 5);\n// returns\n[null, 5];\n```\n\nAdvanced example:\n\n```js\nimport {readFile, readdir} from 'node:fs/promises';\nimport {tryToCatch} from 'try-to-catch';\n\nconst [error, data] = await tryToCatch(read, process.argv[2]);\n\nif (error) {\n    console.error(error);\n    process.exit(1);\n}\n\nconsole.log(data);\n\nasync function read(path) {\n    const [error, data] = await tryToCatch(readFile, path, 'utf8');\n    \n    if (!error)\n        return data;\n    \n    if (error.code !== 'EISDIR')\n        return error;\n    \n    return await readdir(path);\n}\n```\n\n## Related\n\n- [try-catch](https://github.com/coderaiser/try-catch \"try-catch\") - functional try-catch wrapper.\n\n## License\n\nMIT\n","_attachments":{},"homepage":"http://github.com/coderaiser/try-to-catch","bugs":{"url":"https://github.com/coderaiser/try-to-catch/issues"},"license":"MIT"}