{"_id":"@9oelm/maybe","_rev":"3-3b8f7104a4bedf6072fe4dc3edf812e1","name":"@9oelm/maybe","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"@9oelm/maybe","version":"0.1.0","repository":{"type":"git","url":"https://github.com/9oelM/maybe.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","prepublish":"tsc","main":"dist/index.js","types":"dist/index.d.ts","private":false,"licenseText":"MIT License\n\nCopyright (c) 2020 Joel M\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":"@9oelm/maybe@0.1.0","dist":{"shasum":"a98640957f86fb87f352955653b40e851703ac88","integrity":"sha512-0V7unELpH+Cfx3MmN2P+ugoKX0gfKcmPt4txrVeBQcORaaOCZcjg52UbgVY2wq8Jf0SfE3eHHW6ab4FLHRvvGg==","tarball":"https://registry.npmjs.org/@9oelm/maybe/-/maybe-0.1.0.tgz","fileCount":6,"unpackedSize":7969,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1EJ7CRA9TVsSAnZWagAAaGgP/A1XqlJct4rB9Qx+PXfU\nuAJwXqUJxE0bNjONq+6BY5krQ+e4F1CXlIjn2c0i1ws+bPeF/oXNJ6qj/6A6\naq7fpWS5F0xbYj8/tCfLiLPkYeM7pVmN5fmVlzi0ODTEUxMjhCiI5XVPuSWB\nPxxo/hdVKMbjIMOUrXCbV+s75DKoL4snEPN978udMxZ+jMrogRkwgnyV0u3y\nlnzn2ctZsjNjg2NLM6P0LP/vUqcNBbsfNHIOp4Fvu2B7kmZ3xz20Bup3sqnK\nTXcwyICcRgEwKhFNFvsN56lBQNyEWWsv/Ji4CK5DgJusaJrwkPCGt0PRaCuw\nPcbhGtdfJIGG5cS23qllnv8QFasGnU6IbsbQQqNfTl1fJ0dncb1aaTcznDPx\nMrmaTmDpweQaqc85ZUmX278bGKdRPmzYgb57yA74ErHqlhCSBy+NSNzUfK8O\nwE6JmPnLb0fwGURgcPxKbMulolPi6AX/HS4GqfjGXmClJ8yfuHFUoiE4O3MO\nzqPF6LFhQAfzO5bobNjRYOmFCW4PAM1PV+McumgU5JuMCUM0tyhGaV5YyXwx\nqSuE0+od68mazlPb9ucK4mURfEE6wS3bP6KfeRItKbClsL4zjlSFK6i2PIAa\nXgp75WC2Od/v1m8XCx2WInKcLFQ0CKLWI7+9dx8ycfZaSbLmnqUTDZG4YOfj\nOLpk\r\n=2+I4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIATnhWjF9z5WIaq2de69D7nTreCcOgS/7wBZEeli7cRcAiEA6+nMWz3j28bMfWD1xP2WEFUUrD6vPNGvsRzk3wZdKlo="}]},"_npmUser":{"name":"9oelm","email":"whymemememe@gmail.com"},"directories":{},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maybe_0.1.0_1607746170491_0.45807747630983053"},"_hasShrinkwrap":false},"0.1.1":{"name":"@9oelm/maybe","version":"0.1.1","repository":{"type":"git","url":"https://github.com/9oelM/maybe.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","scripts":{"prepublish":"tsc"},"main":"dist/index.js","types":"dist/index.d.ts","private":false,"devDependencies":{"typescript":"^4.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2020 Joel M\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":"@9oelm/maybe@0.1.1","dist":{"shasum":"630407ad83327da61835b9be0197bc5b9fb5f587","integrity":"sha512-eYFFvNGvQD+eUXrtdY8hhCLGoyW+ngy473AXWCOHfmyk6YAkefk82gYbk2RiwuLI4BzRiNY4NXhWQSy4JyW6iA==","tarball":"https://registry.npmjs.org/@9oelm/maybe/-/maybe-0.1.1.tgz","fileCount":8,"unpackedSize":8514,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1EPiCRA9TVsSAnZWagAA2EcP/jbpgE7vfZ49pvHidG0u\nA0IdNwokTeA7FoUOrf2U+TjSe6LgAKm7jkAjx1LZWAZbMTa9JK1WxIZXfSIi\naUs59+l9hkNzAZA+Vi84J7ppm6QR+8nziLu/dHBL8pRXF6c/L33gdlJklo58\n9K5q0IDaPKj9lBnJ7aFpm8X/hUbeCBxfg+DPMLQ4dYHNUXH2HBoZUa9j9oNp\ng96hVGXtPvLIRPHbhh3MugGax8akSdJQ/x/mDFC1LM3+eyl+Ci9iy3z/9Cc+\nSEwtxBqBWjRhgP4w/5uzuaDCfpZmtzzO+Iw2cimcR0QQ0QF8rK1CTDT1yuU7\nHEdWTRE/uV48p/TVDpo9/Veip1BSJlE6P3I/Y0gl4Swa5jf1xTDwGHAAKCcw\njch9MJG2/VLNi2uhdUmpZLTcYdtFcV6VIaF+uLVz8d43WkaDn69xRxY9nv0s\nKiGd5kyD95CYQtvIe7rlaLjQLlQJO09EpLjLtYYIlZ86o8MeoTIMo4Z3eiq+\nbp/UFlYPqqHh/GaCVV7gLCEyYMVnDg5L5TAyQmEtO9h3d7NeAUJDYsWKh8aW\n3AZlKZBUl6RLNZv6KYREnbLfbpOVsC5rXbCdGy3EDlhh9/SKXDgycaO0zzPL\n0WmAoSZxjDPRMhyYdwIQRhl9N4thrgyGnGa30XvoycLyb4/5pKKl0O4JoDl0\nnrZ/\r\n=vGbm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBT0tyeqhQ5VAhAHt2VWVQTL3bbVauqEeKBdbAFzFwQQAiAf5/GYGe1sYn/k00YWpBeVM0gmoTqw3i1tlvHnEr0pEQ=="}]},"_npmUser":{"name":"9oelm","email":"whymemememe@gmail.com"},"directories":{},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maybe_0.1.1_1607746530105_0.8635871370081027"},"_hasShrinkwrap":false},"1.0.0":{"name":"@9oelm/maybe","version":"1.0.0","repository":{"type":"git","url":"https://github.com/9oelM/maybe.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","scripts":{"prepublish":"tsc"},"main":"dist/index.js","types":"dist/index.d.ts","private":false,"devDependencies":{"typescript":"^4.1.3"},"description":"```bash npm i --save @9oelm/maybe","licenseText":"MIT License\n\nCopyright (c) 2020 Joel M\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":"@9oelm/maybe@1.0.0","dist":{"shasum":"008d62a402dae026049df6501081eaa7f119797b","integrity":"sha512-5P2ppV+QlSS/sFU/cNP1XcEPQhDgW0rkRJftF9nkrmgMuvfgwlcVFk0Y0iLXo1QizIbL4ztYa+YIg0GkNnGB9Q==","tarball":"https://registry.npmjs.org/@9oelm/maybe/-/maybe-1.0.0.tgz","fileCount":8,"unpackedSize":9108,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1EZECRA9TVsSAnZWagAAYFkP/RW1aEYmwjXqA7x3KGl9\nElwqdfQ4LbxFmcXjMi6+s/Mz3kT1Qq5C9n+0loMVw5CupNLmyBhoXeD+/vDn\n/SEWdQMrQrUmAJVDwVipM31YyzxQLswjM/2zrTZVnZisL/RT4NhKK1+9/udT\nNx0vEduNVa/p0lEBWRDnzyHWDmSP6yyPEfSaIAiS7R9TJsBzobUHIisxNHOf\n9oY3WqFQkznKN9T88ODiBbbxvZNi/QpWJKln4zy3fKB5L28PVDrPUQhL5L2o\n8ifhpCwWUAvvMqYc3O+8g8YDuzDlhpuKO6Xt+nUBxgGi9UpFAD40DM2fe/7E\n117bg8fIzfVvPVp6T6ELCC9F0RN0bmXhDP1WlVsq7oyEplhQEgmG+sfxl6QB\nyblbWWK+eTEdz+ijR2YrMhm0pokhVxFa5jV3Sg369eoM4hfI0WaojlyKkewF\nMwZlhjQXkKdssfXrGJ5QGL/6/G6Wi3nm7mJi/xr3a6Mwe+bivrwgnLWJLcBD\nomHGUKkdLMPTY+Mwu547WglppPGIDk/U1Cb22inDmBviW0JUsJyCg9V+QTWT\nQ2BqMNFVZdrzijLatevFWrOcPoZaenjFRFhYIBTkllNgn7puOi8eHYTNVnyl\nWBTKe7xaD+eS+SbQMxx0rZ+3ixx4gBPonA8VSR/zMgl73dd2O2z3Cc+f2KZO\npTEm\r\n=rg85\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVhnNSbN5x4FULcOZBqYfAMtYrLG1EUIyuQcrCLPrzXgIgHYxDvqwfkQxp51Vg7vWCDnNBMOVvY3kGZDTTub26QQQ="}]},"_npmUser":{"name":"9oelm","email":"whymemememe@gmail.com"},"directories":{},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/maybe_1.0.0_1607747140147_0.9645952415794616"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-12T04:09:30.445Z","0.1.0":"2020-12-12T04:09:30.674Z","modified":"2022-04-04T10:51:16.973Z","0.1.1":"2020-12-12T04:15:30.239Z","1.0.0":"2020-12-12T04:25:40.282Z"},"maintainers":[{"name":"9oelm","email":"whymemememe@gmail.com"}],"repository":{"type":"git","url":"https://github.com/9oelM/maybe.git"},"author":{"name":"9oelM","email":"hj923@hotmail.com"},"license":"MIT","readme":"# maybe\n\n```bash\nnpm i --save @9oelm/maybe\n\nyarn add @9oelm/maybe\n```\n\nJust my personal util for handling `null` and `undefined`.\n\n## Usage\n\n```ts\nimport { maybe } from '@9oelm/maybe'\n\nconst mayBeNullOrUndefined: HTMLElement | null = document.querySelector('#maybe-exists');\n\nconst text: string = \n  maybe(maybeNullOrUndefined)\n  .then(({ innerText }) => innerText)\n  .otherwise(`please fill out text first`);\n\n// omit .then to just receive the defined value itself\nconst someHTMLElementOrMyFallbackHtmlElement: HTMLElement = \n  maybe(mayBeNullOrUndefined).otherwise(document.createElement('div'))\n```","readmeFilename":"README.md","description":"```bash npm i --save @9oelm/maybe"}