{"_id":"@cahmoraes93/either","_rev":"7-7894d14a1e80e0c30c90638e0b8b1d72","name":"@cahmoraes93/either","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"@cahmoraes93/either","version":"1.0.0","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.0.0","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"63458a530fc6f190ec74e92cf6731893a0dc084a","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.0.0.tgz","fileCount":18,"integrity":"sha512-1qSXFjavi8tyIvGJp6DbrRwJCOF5ZWdGbLDbfp7QNL+u826qkZtnHwpJYMcLjtxcMqZ3m+AD6u2AeAa48xD9Cg==","signatures":[{"sig":"MEUCIQD3xd3nSdc2Jx69qIWGLoAMmZvEiI4uQlRSpUYtViW3wQIgSZWwONL23cTJrNW+7e1KapzHTWdktj4KWfmDDNzQxiA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29069,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoxUvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqdBQ/8Dc0mh2aVtEHHVsjBg5l0P6K/N7U9jhE15rQ45NcGHiMGGee9\r\nHCvPm7EQRc0hNNVfnLgM00lLftMeg0i74brl13oHMn8xM/bPnnsJGy8SDYRY\r\nEuFvg1gRG5KDL3mOzG/GofQQYhLEPErJG1V4HdvEV/VytzOidRBjg0L33QnY\r\nLXbSYvKiIqh2X7ICoCLDTRhO1MCy4YWZOxlxHu8sm4yWHTkCAj7gI6LkNO+K\r\n8BVAYbkapYEf/5UCLj3AFanB85KovSipeP3uUCvN6dREC7FBbumx/kS33GhW\r\n4W9EygEr2jrl70exZ0jvrx9u4tWCVcwP2U/r46/V+BCTHifBQlHsQf77Q/NK\r\nLZk0AxnOz7pIRyLOqVpGfxktg+X5CGnzZUJum7Ab8E47PqKI6SDJHEG7ptIM\r\niRQwGxfDGTYayNY3d8wXLezJJ8ByRTN+M6CYTcAMHbA1aG5WN3ZTPKMNMi/v\r\n3LYO2yY3FV9qzt5Yz640EvXgjM116OA/GLdI3ljzcANspPMa2odRiqmU6rSr\r\nP1q8Pznx3kL8YbtRiue5k+p6U6IdFyH2p4pEm2zxGsx68ZEYXlFtGRzPFP5x\r\n8o+VaGApJWrvzbH4Cy2CdyNBMz2NSUAbYHCpH7EF40ZbFrVqjbMQs0W6Mwi6\r\nyT6zI1J86AaK0sqLMbOQS8DP+4xx0XHRz9k=\r\n=3aKE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"8833a4508d80a805f0adde00f1ea638dcec09e90","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx jest","build":"tsup --format esm,cjs","test:cov":"npx jest --coverage","test:watch":"npx jest --watchAll"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"8.19.2","description":"This package implements Monad Either","directories":{},"_nodeVersion":"16.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","tsup":"^6.2.3","eslint":"^8.23.0","ts-jest":"^29.0.2","prettier":"^2.7.1","babel-jest":"^29.0.3","typescript":"^4.8.2","@babel/core":"^7.19.1","@types/jest":"^29.2.4","ts-node-dev":"^2.0.0","@babel/preset-env":"^7.19.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@babel/preset-typescript":"^7.18.6","@typescript-eslint/parser":"^5.36.1","@typescript-eslint/eslint-plugin":"^5.36.1"},"_npmOperationalInternal":{"tmp":"tmp/either_1.0.0_1671632175033_0.46411233861876","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@cahmoraes93/either","version":"1.0.1","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.0.1","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"7ce61a07a575305f19e4a3b5cd27e5c756fb788f","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.0.1.tgz","fileCount":18,"integrity":"sha512-QyRFWSsLJctxi6WIcLQ54Fed2fnoW/ZjMANuWtqMbsYYCDbh0ASJDddZgLwT3IGsR1CyvelHt2tYOssvbakMzw==","signatures":[{"sig":"MEUCIQDeDbO6aJuKayW0aB1o6kiGsBciTFfbZNQ/Xbo0NCpuSAIgBmGpswOn0+z+5m10wYSJID9NUJbRjeC9N8NG8rP0dm8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjo0YlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoghw//flJ+QV4/TLrH2APUxoov6FZF7Ll40264nSxRPsE5greC7x/T\r\nanU/LhUcS3/zMASAa6oJz2zVMr3CNFhzRJxX14I3+JFwjY1vbPpigb8AALLL\r\nFQOxGflwQ15cOdD+As2ZnfSQKRRRjE2HSmhxWrj1H4P12DIA2poEnmsqPpnX\r\nBzEztXMVparr6XO+dvIiT3BsjLUMogRn2UJpXhYAkPFCzpLQ2UgWGV5JQu9X\r\nkeX8ruWm2S12IdkFBX7ukSwcbwOWyqDwdylwhyhhTuPvG6MSvsrpE3wMGviG\r\njdLd9G8coHKGBVrxdyj8ZQGW+sC7Xx/c/GSMH2FUiow9cQ22VrIDzcMHRFTR\r\nxLuyJvQ62ctQcr1r/fMmDI81cc8FwgXW6ngiMTqRKD/hywBTkeOqanHhjUPu\r\n14dWcdfwxpsaEM9+g34eJ/aOXKiuHIlPed1Wn6peConLTq7DRF0/AZIveWcC\r\n36inMRpg7AGbC64Eu3EcoVeG9vGz4xQaYV3JrtVEtyy1sOpzxsxb5ksDrXqi\r\nCm12ZbYLxk3qpo2CGa3rUgUqjx6LFL7eC9STaFESH9k50ON/I3tqwGrETvqN\r\nYk79nO6x6zL+SJrxMonx9nf/r6SOaG9xREWPO52oiFyA4P1hPXSlag6kQz5r\r\nVcqSYF29h1oB8yybt6VmKTuCVyb9+q7zaAM=\r\n=0b7/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"59c16f7d662db149721d5fa339d807b50ee295c5","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx jest","build":"tsup --format esm,cjs","test:cov":"npx jest --coverage","test:watch":"npx jest --watchAll"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"8.19.2","description":"This package implements Monad Either","directories":{},"_nodeVersion":"16.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","tsup":"^6.2.3","eslint":"^8.23.0","ts-jest":"^29.0.2","prettier":"^2.7.1","babel-jest":"^29.0.3","typescript":"^4.8.2","@babel/core":"^7.19.1","@types/jest":"^29.2.4","ts-node-dev":"^2.0.0","@babel/preset-env":"^7.19.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@babel/preset-typescript":"^7.18.6","@typescript-eslint/parser":"^5.36.1","@typescript-eslint/eslint-plugin":"^5.36.1"},"_npmOperationalInternal":{"tmp":"tmp/either_1.0.1_1671644709137_0.9957352967688127","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@cahmoraes93/either","version":"1.0.2","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.0.2","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"73cd2c0806fd24f77094fa34c62d19b0943e3b38","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.0.2.tgz","fileCount":18,"integrity":"sha512-Jvg8SOOr9WWMsAAexupmYPkm3/5E7Xiw5bsfmTQzm76Vdd8m3CknJV5DLrU8tH/kWjp6xhGCFf8x/9gk8KwMhQ==","signatures":[{"sig":"MEYCIQDqMIHDm5l631xxjWVYRlkD1B3KbdyTvPOFESboiNmDXwIhANq54WY88PyFwMF2HnLQy3DKO21jDtxvozx7qu+ighCf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpeaMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLSRAAj30z7lL3tvsMc62o+JDsGWgeVnwP4/MvGwCS1BVRtOmXMp2e\r\nWBxtkxwBviH1eGrN1xGn61QMjC3DEsiWttCWrdr2Wt9JUmCBku+JfVOAwaZR\r\n6ubSDIuaWtp0sSwkOtpQ1JAgUmBOsFZ5yUsaSztNwWnMQIgfj4xe7JE0DCSc\r\nphtEbm5Mzr97Am7MQxl3NApHbCONHlcZrSgsfC4RUG6NtvVxAX/34dA5Jbma\r\nQ0SxweMac+Afm9l3MbciiI8ZK4vgcCiKQxb9O6nNF5fE/kcsGrkwJixnQF7k\r\nKPdLqbPvnN/MzyvQtmPw2/vifE13VyIq3X5cg54RCAWJ3jjZXdHiV6I1RECp\r\nuP7l4zJiQMjezPVyPXm8UZjkQURWuoeG1lX0qvbEDIiTH9iQYsKhF5xXGN3U\r\n88nVaRsY+S+69JPcP7XNuWb0DkNAQbP6qaCkGRb69W6gm5+5EsXTNcipueyb\r\noJYzEiw5J4evG+GpINuznSWRTKO89sopLyIUJrt0IaOjoPeVD6SvTIIqgLHu\r\nzvib/tz11XHP5LoxX/LAR4FRH98yZ8kG7gvyDtygV3j8jQ3U/1M97cR0nyK5\r\nNE8OG5ZOn1vYp4RlJZcl/xiQPNbWCJx+xrKTK8wCyJbtd4Sx+Wjkh5qNimlN\r\nvdHmb+bnOO8gWASuI9MiSGBRGrIJ+LJCOV4=\r\n=nZcU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"8a981550b7b17a958a746344871205f86e0645a1","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx jest","build":"tsup --format esm,cjs","test:cov":"npx jest --coverage","test:watch":"npx jest --watchAll"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"8.19.2","description":"This package implements The Monad Either","directories":{},"_nodeVersion":"16.18.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","tsup":"^6.2.3","eslint":"^8.23.0","ts-jest":"^29.0.2","prettier":"^2.7.1","babel-jest":"^29.0.3","typescript":"^4.8.2","@babel/core":"^7.19.1","@types/jest":"^29.2.4","ts-node-dev":"^2.0.0","@babel/preset-env":"^7.19.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","@babel/preset-typescript":"^7.18.6","@typescript-eslint/parser":"^5.36.1","@typescript-eslint/eslint-plugin":"^5.36.1"},"_npmOperationalInternal":{"tmp":"tmp/either_1.0.2_1671816844525_0.5484982411210577","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@cahmoraes93/either","version":"1.0.3","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.0.3","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"ac92176cd6c0bb252a0190dd2dc23c0aca4253a4","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.0.3.tgz","fileCount":11,"integrity":"sha512-GPFbHK5n5IcmnjHyQ5dFoxljyMHw2NpZvbVechVOudn8pUWguNr026jTQefffiTDRHiCNhHQ+nTQsKUXO89qYw==","signatures":[{"sig":"MEQCIGmCbqOW65kaPIZ0z6kyb06byepHuS15hxRAwptp3ch5AiB2zaJO4sXUoPKCcCcqFKqSeL+EAfYDkxLsSGZq76H3EA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11307},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"afbf836d30a1eb6d3bf1e8903fee1b07b367e9b9","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx jest","build":"tsup --format esm,cjs","test:cov":"npx jest --coverage","test:watch":"npx jest --watchAll"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"8.19.2","description":"This package implements The Monad Either","directories":{},"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.6.4","tsup":"7.2.0","eslint":"8.48.0","ts-jest":"29.1.1","prettier":"3.0.2","babel-jest":"29.6.4","typescript":"5.2.2","@babel/core":"7.22.11","@types/jest":"29.2.4","ts-node-dev":"2.0.0","@babel/preset-env":"7.22.10","eslint-config-prettier":"9.0.0","eslint-plugin-prettier":"4.2.1","@babel/preset-typescript":"7.22.11","@typescript-eslint/parser":"6.5.0","@typescript-eslint/eslint-plugin":"6.5.0"},"_npmOperationalInternal":{"tmp":"tmp/either_1.0.3_1693256831015_0.9793553557928563","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@cahmoraes93/either","version":"1.0.4","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.0.4","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"8d5dff64226e3d8817cad58148f70e4b2189ee34","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.0.4.tgz","fileCount":8,"integrity":"sha512-AgU573egzEc7w1mFBQmW+szMbb6dOh+FDvB/AI5qQ8g6MiaXo9KfY2Ssxj+D65wp/2i1e1Ca7JVzDUq0rUkJuw==","signatures":[{"sig":"MEUCIFKpKerpMLpd68h1y3yfmamWfhbzSmCS7bY2y2wKQVUEAiEA8+6KnVPaU3o/VCpE8g+NtlMStXW7JoZxkSTFKDpatkc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10244},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"f9a1dcebe54c04628b9eb8b6c6fadcd7378bfaf0","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx jest","build":"tsup --format esm,cjs","test:cov":"npx jest --coverage","test:watch":"npx jest --watchAll"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"8.19.2","description":"This package implements The Monad Either","directories":{},"_nodeVersion":"18.12.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"29.6.4","tsup":"7.2.0","eslint":"8.48.0","ts-jest":"29.1.1","prettier":"3.0.2","babel-jest":"29.6.4","typescript":"5.2.2","@babel/core":"7.22.11","@types/jest":"29.2.4","ts-node-dev":"2.0.0","@babel/preset-env":"7.22.10","eslint-config-prettier":"9.0.0","eslint-plugin-prettier":"4.2.1","@babel/preset-typescript":"7.22.11","@typescript-eslint/parser":"6.5.0","@typescript-eslint/eslint-plugin":"6.5.0"},"_npmOperationalInternal":{"tmp":"tmp/either_1.0.4_1693491888388_0.03466685014525406","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@cahmoraes93/either","version":"1.0.5","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.0.5","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"0f9f9d254cdfe4e731b15a3673b83746e2dade58","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.0.5.tgz","fileCount":8,"integrity":"sha512-Jp25PSKftmL8nwdt+gOmbi1wO3Sgj8eW18rmDX74nSUTvxZ9hy1PUjOCH9Sl5XJYGeySkOcWHoBLCRzoA+mHhw==","signatures":[{"sig":"MEQCIAOnnpAS628CXis+sFt+6q1dNYKN3CewHA+U+JSwD70cAiA5OxQ6Iz+pC8tld6KFURXdr//TC98o4RCkPQfx+y8IeQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10142},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"60bd079881020669ef61a8e8d362f75b92205d1a","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx vitest","build":"tsup --format esm,cjs","test:cov":"npx vitest --coverage","test:watch":"npx vitest"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"9.8.1","description":"This package implements The Monad Either","directories":{},"_nodeVersion":"18.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"7.2.0","eslint":"^8.49.0","vitest":"^0.34.4","prettier":"^3.0.3","typescript":"^5.2.2","ts-node-dev":"2.0.0","@vitest/coverage-v8":"^0.34.4","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@rocketseat/eslint-config":"^2.1.0","eslint-plugin-vitest-globals":"^1.4.0","@typescript-eslint/eslint-plugin":"^6.6.0"},"_npmOperationalInternal":{"tmp":"tmp/either_1.0.5_1699058138249_0.8922998836365046","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@cahmoraes93/either","version":"1.1.0","keywords":["functional programming","monad"],"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","_id":"@cahmoraes93/either@1.1.0","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"dist":{"shasum":"5da9163abdc89ffe775d788dbb137cb8c4383d21","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.1.0.tgz","fileCount":6,"integrity":"sha512-iIfP4mgUhWypvyM1kD+KApaqb/w5PieaKJNYgeSl1xtDYjDoL3JnzVN9ExTbrguYPm6RfaB/jr1zKcUlDj8daA==","signatures":[{"sig":"MEUCIQD1pVdG5WX0SoY8ALgDtYbf4j/57gL3XCorJOspgBYp/AIgGaXWPdCMivVHytudxmiFVEKDwFdwRZteVc8wrzQyoyQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8205},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs"}},"gitHead":"6c08ee939f37d31f97a3ae3e94499725ae277767","scripts":{"dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts","test":"npx vitest","build":"tsup --format esm,cjs","test:cov":"npx vitest --coverage","test:watch":"npx vitest"},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"repository":{"url":"git+https://github.com/Cahmoraes/Monad-Either.git","type":"git"},"_npmVersion":"10.8.3","description":"This package implements The Monad Either","directories":{},"_nodeVersion":"20.17.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.5","eslint":"^9.14.0","vitest":"^2.1.4","prettier":"^3.0.3","typescript":"^5.2.2","ts-node-dev":"2.0.0","@vitest/coverage-v8":"^2.1.4","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","@rocketseat/eslint-config":"^2.1.0","eslint-plugin-vitest-globals":"^1.4.0","@typescript-eslint/eslint-plugin":"^8.13.0"},"_npmOperationalInternal":{"tmp":"tmp/either_1.1.0_1731243717179_0.4892289497075595","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@cahmoraes93/either","version":"1.1.1","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.mjs"}},"keywords":["functional programming","monad"],"description":"This package implements The Monad Either","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/Cahmoraes/Monad-Either.git"},"scripts":{"test":"npx vitest","test:watch":"npx vitest","test:cov":"npx vitest --coverage","build":"tsup --format esm,cjs","dev":"ts-node-dev --respawn --transpile-only --ignore-watch ./node_modes ./app/index.ts"},"license":"MIT","devDependencies":{"@rocketseat/eslint-config":"^2.1.0","@typescript-eslint/eslint-plugin":"^8.13.0","@vitest/coverage-v8":"^2.1.4","eslint":"^9.14.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.0","eslint-plugin-vitest-globals":"^1.4.0","prettier":"^3.0.3","ts-node-dev":"2.0.0","tsup":"^8.3.5","typescript":"^5.2.2","vitest":"^2.1.4"},"_id":"@cahmoraes93/either@1.1.1","gitHead":"502a0292fb9d5b1300dac0ccc8881a5fc148592c","bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"homepage":"https://github.com/Cahmoraes/Monad-Either#readme","_nodeVersion":"20.17.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-O8H/2k2in9whRO5hzzl/0LCmhYpIB/PKCQaXhkFoLOiVPMpFpAjDlW6P2QDKXw2uG3vuGUcbhJ1jX+bpHFioUg==","shasum":"7561b43ffc2166afd8564a9ea800c7b857faf127","tarball":"https://registry.npmjs.org/@cahmoraes93/either/-/either-1.1.1.tgz","fileCount":7,"unpackedSize":8298,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcuCFYNElAlZHPNv4ku5Uc//SOMQ4cTKk/du7uwpLMoAiEA2foewyBEbbQdGnXeac2ezuHyghOSVtQab+8J99WUQnI="}]},"_npmUser":{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"},"directories":{},"maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/either_1.1.1_1731244276976_0.5059895614366701"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-21T14:16:14.930Z","modified":"2024-11-10T13:11:17.390Z","1.0.0":"2022-12-21T14:16:15.211Z","1.0.1":"2022-12-21T17:45:09.273Z","1.0.2":"2022-12-23T17:34:04.715Z","1.0.3":"2023-08-28T21:07:11.209Z","1.0.4":"2023-08-31T14:24:48.556Z","1.0.5":"2023-11-04T00:35:38.585Z","1.1.0":"2024-11-10T13:01:57.370Z","1.1.1":"2024-11-10T13:11:17.215Z"},"bugs":{"url":"https://github.com/Cahmoraes/Monad-Either/issues"},"author":{"name":"Cahmoraes","email":"ike.moraes93@gmail.com"},"license":"MIT","homepage":"https://github.com/Cahmoraes/Monad-Either#readme","keywords":["functional programming","monad"],"repository":{"type":"git","url":"git+https://github.com/Cahmoraes/Monad-Either.git"},"description":"This package implements The Monad Either","maintainers":[{"name":"cahmoraes93","email":"ike.moraes93@gmail.com"}],"readme":"# Monad Either\r\n\r\nEither is a set of functions to generate a monad, the Either monad.\r\nIts role is to elegantly handle situations that can generate an error.\r\n\r\nUsing TypeScript features, this package is able to perform type guard through Type Predicate.\r\n\r\nThe **isLeft()** and **isRight()** methods were made using Type Predicate features to refine TypeScript's type-safety and ensure type safety.\r\n\r\nRead more:\r\n[Advanced Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html)\r\n\r\nHow it works: Either literally means OR one thing OR the other. You can define that a method can return some types of error or some types of success. Error types are on the left and success types are on the right. For example, in the case of creating an email, the method that creates the email can return InvalidEmailError OR the object of type Email successfully created.\r\n\r\nIt is possible to know if the returned type was error or success by asking if it is \"right\" or \"left\". That is, if it is \"left\" it is a type of error, if it is \"right\" it is a type of success.\r\n\r\n- **EitherType<L, R>**:\r\n  Type alias to set a method return to Either. The type variable \"L\" defines the types of errors separated by pipes \"|\" and the type variable \"R\" defines the success type.\r\n\r\n  This type is only used to define the return type of a functions that will return an \"Either\" e.g. (Left or Right)\r\n\r\n---\r\n\r\n## Left<L, R>\r\n\r\nConstructor function that returns an Either instance of type Left.\r\n\r\n### property\r\n\r\n```ts\r\n- value: L\r\n  // Returns the wrapped value\r\n```\r\n\r\n### methods:\r\n\r\n```ts\r\n- isLeft(): boolean\r\n  // Returns true when instance is type of Left\r\n```\r\n\r\n```ts\r\n- isRight(): boolean\r\n  // Returns false when instance is not type of Left\r\n```\r\n\r\n<br>\r\n\r\n## Right<L, R>\r\n\r\nConstructor function that returns an Either instance of type Right.\r\n\r\n### property\r\n\r\n```ts\r\n- value: R\r\n  // Returns the wrapped value\r\n```\r\n\r\n### methods:\r\n\r\n```ts\r\n- isLeft(): boolean\r\n  // Returns false when instance is type of Right\r\n```\r\n\r\n```ts\r\n- isRight(): boolean\r\n  // Returns true when instance is not type of Right\r\n```\r\n\r\n---\r\n\r\n<br>\r\n\r\n## Factories Left and Right\r\n\r\n```ts\r\n- Either.left<L, R>(aValue: L): Left<L, R>\r\n```\r\n\r\nFactory function to build an Either object of type Left.\r\n\r\n<br>\r\n\r\n```ts\r\n- Either.right<L, R>(aValue: R): Right<L, R>\r\n```\r\n\r\nFactory function to build an Either object of type Right.\r\n\r\n<br>\r\n\r\n---\r\n\r\n<br>\r\n\r\n## Example using left and right\r\n\r\n```ts\r\nimport { Either, EitherType } from '@cahmoraes93/either'\r\n\r\nfunction doThing(): EitherType<EvenNumberException, number> {\r\n  const randomNumber = Math.floor(Math.random() * 10)\r\n\r\n  if (randomNumber % 2 === 0) {\r\n    // Either.left to return an Error/Exception\r\n    return Either.left(new EvenNumberException(randomNumber))\r\n  }\r\n  // Either.right to return success\r\n  return Either.right(randomNumber)\r\n}\r\n\r\nconst result = doThing()\r\n```\r\n\r\n## Usage Example\r\n\r\n```ts\r\nimport { Either, EitherType } from '@cahmoraes93/either'\r\n\r\nclass InvalidEmailError extends Error {...}\r\nclass InvalidLengthError extends Error {...}\r\n\r\nfunction createEmail(): EitherType<InvalidEmailError | InvalidLengthError, string> {\r\n  const email = service.generateRandomEmail()\r\n\r\n  if (!email.includes('@')) {\r\n    return Either.right(\r\n      new InvalidEmailError(`The email is too short ${email}`)\r\n    )\r\n  }\r\n\r\n  if (email.length < 5) {\r\n    return Either.left(\r\n      new InvalidLengthError(`The email is too short ${email}`)\r\n    )\r\n  }\r\n\r\n  return Either.right(email)\r\n}\r\n\r\n  const emailOrError = createEmail()\r\n\r\n  if (emailOrError.isLeft()) {\r\n    // handle the error in the best way\r\n    console.error(emailOrError.value.message)\r\n  }\r\n\r\n  /*\r\n    from this point the email is valid, it is possible to omit the emailOrError.isRight() call\r\n  */\r\n\r\n  if (emailOrError.isRight()) {\r\n    console.log(emailOrError.value)\r\n  }\r\n\r\n\r\n```\r\n","readmeFilename":"readme.md"}