{"_id":"p-allay","_rev":"2-cb7bc7125adcd9fa7142e09ea35ea838","name":"p-allay","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"p-allay","version":"0.1.0","keywords":["allay","promise","reject","resolve"],"author":{"url":"https://github.com/mk-pmb","name":"M.K."},"license":"ISC","_id":"p-allay@0.1.0","maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"contributors":[],"homepage":"https://github.com/mk-pmb/p-allay-js/#readme","bugs":{"url":"https://github.com/mk-pmb/p-allay-js/issues"},"dist":{"shasum":"32fe87a488ce5cb6a9df37a14416956f86fe4560","tarball":"https://registry.npmjs.org/p-allay/-/p-allay-0.1.0.tgz","fileCount":6,"integrity":"sha512-FoAGqrlhQERvAPc4HIh6wqZ+rg3fUEYvwMfmzadNr1JI5EnLRqTBM2wyQsdsr6xPSaztajZSpx7zP00/3UMC+A==","signatures":[{"sig":"MEYCIQDgdhb8NcxxJA6zbCh96wBxR8jePVHgfZu2zGPf+guxAAIhANxQVYAtlX7k3IL2DIXR4ZaiqpfNs+4IHXwgRp+O8+5V","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiS/cWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhTA/+KgMMrdCLnWFvQQe6IvudmyN2RSp6pMxFiSlDI2hKBFC1HitD\r\nZYdMcpyrPdOTkgSaMpFFc8ZpB5FQrYzrh2exjjfg7WuXubdSl/Wbz5IRMF5p\r\neicIJT92+dUm3/rKhN/h97PbCHqQYh4xnLX2ycTJxRfXLUVSTDHg6TiJ3PGZ\r\nDAOcSJFuYO1jItr6JRTXEVWEdNuXrLGV0x6bfEgtjnvf/ZeSrtZmv0+zR+MX\r\naDooxYAkufXDbkrlQj7nP1TJHGvTOGG32+n4QriYYXjx9ak522eIWodRSmKp\r\nR1xePTc+n5fzb4qNXmYRE/V5px8QwEl1XxKjAYWK3EXc/E/4f46DMLi1+jPs\r\nEQi8qi9H/Ly9nInQuJbJr+IUSvSgIX4HDkYtSQVGYMyVkrzeNP+6Rd8Le4tF\r\nAkeJES8BRXJOe4klHfiq+opKEZGjAfs/0LK+fpvQTorei8m+vtzvOo0/H9/9\r\nozxomH8N4w62XZjE+3PeQV8GlYJvU1mMpOxNE2vCdLmpJeEGLzPVrmspajRU\r\nXdFIA25zv676ixO4vxjO3HcK0lnjn6dL7jnJVqSHXUDFqLTUsMudK/GzbXvc\r\ncPWJQDNBzv3F8wcytkogAnBO6OWnflK72B5CbnjKIOQhHOY1SmRsrg2R6Wbf\r\ndPeMGYcsvUC+NqBDBG2Rm4JdZ9B+4yPj8to=\r\n=G8hQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"allay.mjs","engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"04534f278e4d74cf5dbdff57116075842297513e","private":false,"scripts":{"test":"elp && node test/all.mjs"},"_npmUser":{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"},"repository":{"url":"git+https://github.com/mk-pmb/p-allay-js.git","type":"git"},"_npmVersion":"6.14.16","description":"Allay expected promise rejections: Resolve with your failure value instead.","directories":{"test":"test"},"_nodeVersion":"8.17.0","dependencies":{"getown":"^1.0.0"},"eslintConfig":{"extends":"nodejs-pmb"},"_hasShrinkwrap":false,"devDependencies":{"absdir":"^1.0.6","p-tape":"^4.0.2","nodemjs":"^0.1.9","p-fatal":"^0.1.3","usnam-pmb":"^0.2.5","eslint-pretty-pmb":"^1.0.5","eslint-plugin-node":"^11.1.0","eslint-config-nodejs-pmb":"^0.3.3","eslint-plugin-json-light-pmb":"^1.0.7"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/p-allay_0.1.0_1649145622273_0.627258623740353","host":"s3://npm-registry-packages"},"npm vs. BOM = Unexpected token":"-*- coding: UTF-8 -*-"},"0.1.1":{"name":"p-allay","version":"0.1.1","description":"Allay expected promise rejections: Resolve with your failure value instead.","keywords":["allay","promise","reject","resolve"],"author":{"name":"M.K.","url":"https://github.com/mk-pmb"},"homepage":"https://github.com/mk-pmb/p-allay-js/#readme","repository":{"type":"git","url":"git+https://github.com/mk-pmb/p-allay-js.git"},"bugs":{"url":"https://github.com/mk-pmb/p-allay-js/issues"},"contributors":[],"private":false,"license":"ISC","main":"allay.mjs","scripts":{"test":"elp && node test/all.mjs"},"directories":{"test":"test"},"eslintConfig":{"extends":"nodejs-pmb"},"dependencies":{"getown":"^1.0.2"},"devDependencies":{"absdir":"^1.0.6","eslint-config-nodejs-pmb":"^0.3.14","eslint-plugin-json-light-pmb":"^1.0.7","eslint-plugin-n":"^17.16.2","eslint-pretty-pmb":"^1.0.7","p-fatal":"^0.1.6","p-tape":"^4.0.2","usnam-pmb":"^0.2.5"},"engines":{"npm":">=7.0.0","node":">=16.0.0"},"gitHead":"40e15d8dfd1d70c35cadb4d3d82bb906087451da","_id":"p-allay@0.1.1","_nodeVersion":"24.12.0","_npmVersion":"6.14.18","_npmUser":{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"},"dist":{"integrity":"sha512-uhfut0YWvVIgihmHlzj0Nv12EKOJGEQX66KnyUpKK5WI0H6mByajv8/VH5aTtisF1846u/XijvZMuN/EIJv6jg==","shasum":"e0bff181e6064513e223a94b28e1dcf01ed6b04c","tarball":"https://registry.npmjs.org/p-allay/-/p-allay-0.1.1.tgz","fileCount":7,"unpackedSize":6736,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFzBoOk7DHM4gxpeKfjQ4OHKt1ZXFl5DLxNeR5bMC/lGAiBds3u0uMEwcRxi/Phm3MPOpEH61J7z6z7Ld2VnBshZ9w=="}]},"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/p-allay_0.1.1_1776289255332_0.0139291839463902"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-05T08:00:22.272Z","modified":"2026-04-15T21:40:55.669Z","0.1.0":"2022-04-05T08:00:22.406Z","0.1.1":"2026-04-15T21:40:55.556Z"},"bugs":{"url":"https://github.com/mk-pmb/p-allay-js/issues"},"author":{"name":"M.K.","url":"https://github.com/mk-pmb"},"license":"ISC","homepage":"https://github.com/mk-pmb/p-allay-js/#readme","keywords":["allay","promise","reject","resolve"],"repository":{"type":"git","url":"git+https://github.com/mk-pmb/p-allay-js.git"},"description":"Allay expected promise rejections: Resolve with your failure value instead.","contributors":[],"maintainers":[{"name":"mk-pmb","email":"mk+npmjs@pimpmybyte.de"}],"readme":"﻿\n<!--#echo json=\"package.json\" key=\"name\" underline=\"=\" -->\np-allay\n=======\n<!--/#echo -->\n\n<!--#echo json=\"package.json\" key=\"description\" -->\nAllay expected promise rejections: Resolve with your failure value instead.\n<!--/#echo -->\n\n\n\nAPI\n---\n\nThis module exports an object that holds these methods:\n\n\n### .ifPropDef(key[, pr])\n\nWithout `pr` missing or false-y,\nreturns a function `allayIfPropDef(err)` that will:\n\n* Lookup `err[key]`, and if it's not `undefined`, return it.\n* Otherwise, throw something:\n  * If `err` is an object, throw that.\n  * If `err` is a non-empty string, throw a `new Error(err)`.\n  * If neither, throw a `TypeError` that complains about `err`.\n\nIf `pr` is true-y, instead return the result of calling\n`pr.then(null, allayIfPropDef)`.\n\n\n\n### .byCode(dict[, pr])\n\nReturns a function `allayByCode(err)` that will:\n\n* Try to look up an `err.code`-named own property in dictionary object `dict`.\n  If found, and its value is not `undefined`, return that value.\n* Otherwise, throw as described for `.ifPropDef`.\n\n`pr` works like with `.ifPropDef`.\n\n\n\n### .eNoEnt([pr])\n\nShorthand for `.byCode({ ENOENT: false }, pr)`.\n\n\n\n### .eIsDir([pr])\n\nShorthand for `.byCode({ EISDIR: false }, pr)`.\n\n\n\n\n\n\n\nUsage\n-----\n\nsee [test/usage.mjs](test/usage.mjs).\n\n\n\n<!--#toc stop=\"scan\" -->\n\n\n\nKnown issues\n------------\n\n* Needs more/better tests and docs.\n\n\n\n\n&nbsp;\n\n\nLicense\n-------\n<!--#echo json=\"package.json\" key=\".license\" -->\nISC\n<!--/#echo -->\n","readmeFilename":"README.md"}