{"_id":"@putout/plugin-apply-maybe","_rev":"3-4110f42ba5d8ce932022ad4a1d5b03b0","name":"@putout/plugin-apply-maybe","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.0":{"name":"@putout/plugin-apply-maybe","version":"1.0.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin applies Maybe monad","homepage":"https://github.com/coderaiser/apply-maybe/tree/master/packages/plugin-apply-maybe#readme","main":"lib/index.js","commitType":"colon","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/apply-maybe.git"},"scripts":{"wisdom":"madrun wisdom","test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","apply-maybe-plugin","plugin","apply-maybe"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-n":"^15.2.4","eslint-plugin-putout":"^16.0.0","lerna":"^6.0.1","madrun":"^9.0.0","montag":"^1.2.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=28"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"ef563eb91c46fb3697f72aa61490d9ad6738aac7","bugs":{"url":"https://github.com/coderaiser/apply-maybe/issues"},"_id":"@putout/plugin-apply-maybe@1.0.0","_nodeVersion":"18.13.0","_npmVersion":"9.1.3","dist":{"integrity":"sha512-WSFgA0uIGHAYe2GG5N5+iDdKpFTnWIBwjKabKj8Rr+Sn0PrGM5yhv67adAOVj0vsmyCYYNMMkHTUH/JpFD/6Pw==","shasum":"ece4681b72a897ee36cb3d1d9cefc5925c4fa919","tarball":"https://registry.npmjs.org/@putout/plugin-apply-maybe/-/plugin-apply-maybe-1.0.0.tgz","fileCount":7,"unpackedSize":4553,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9y6e9PfrVvqPtbB/Ep0t77ffl4pUQFVdfDpvz7GVWUAiBa5OfrOCeBxupVyZYozFbEkkD0FQ/J7R9g+va0L7zo9Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3reaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTJhAAgG/YGof+yVqWJvKNjfEDs3SJePFxb+f2xeqCPcufnZp/gktX\r\n+eAm79ymdiWdoCGTLQwedCCTPwpIgBj+cMXvnLGdWXwwzJdASU+SEeVOkAbI\r\nTMH9wD3DtV9612PaaqcCHRt/v3/PIIGF85U3BquVzFAx36/0rT6tHjuJ5zDA\r\nfZe6HAodkNfuagurMp6I0Rj03pQTCnpHWgFkSfvG1WJu66kBn3+Buc5UPY5D\r\nj8Nc9mJAm/1H3SyG0zYpgQRQK6JB7hWLp8vmflW+F8Y8/z8AnELBohTx6+eH\r\nKO8gHmGoPsfWHmA0WEuEKTi3PYE5JKztUu6SAcNfJYtuGegPtkKfXan2rKV1\r\nvjFClELpOHtfUcpLdlEVjQwJNo0HgeZ5TlVhbdAXhmbxelB9d8m29MDLj286\r\nnq4HhktoUEOnjgt1ZuYhzd++mRg3yYEJzqgNalybQhyQqA93r/V+QL6MwEJI\r\nN+hkanUj3ezlS6SxF3nQATJtPWoyAqzmvE/Yik2VYXpC9bPlkIFmGUGjeERw\r\nS3EYT+ZLIunhpD4A8kHDd23A9NinC08TAiqX8SINgRY25itBHmpdof5LTPoC\r\nZCCmfEp/xNwGrZbmEVtGzwlghKSWHjWS7FXBFC8FZekk7tnkwDSOvEWcI6Xk\r\nnziIUO/9E8cNgwJURP1vzWLBUpjkqSetQQI=\r\n=FAx5\r\n-----END PGP SIGNATURE-----\r\n"},"_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/plugin-apply-maybe_1.0.0_1675540377970_0.6305117103193258"},"_hasShrinkwrap":false},"1.1.0":{"name":"@putout/plugin-apply-maybe","version":"1.1.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin applies Maybe monad","homepage":"https://github.com/coderaiser/apply-maybe/tree/master/packages/plugin-apply-maybe#readme","main":"lib/index.js","commitType":"colon","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/apply-maybe.git"},"scripts":{"wisdom":"madrun wisdom","test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","apply-maybe-plugin","plugin","apply-maybe"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-n":"^15.2.4","eslint-plugin-putout":"^16.0.0","lerna":"^6.0.1","madrun":"^9.0.0","montag":"^1.2.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=28"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"383dac0d2fa0a244c7d877481b908765275b36a4","bugs":{"url":"https://github.com/coderaiser/apply-maybe/issues"},"_id":"@putout/plugin-apply-maybe@1.1.0","_nodeVersion":"18.13.0","_npmVersion":"9.1.3","dist":{"integrity":"sha512-95PJrk/50tq7KmMIUyKwoKHIU5uiLTHZQfzJOlTkqT5PcePmh/mouelQl6X7cBjMtR1NNSPUdOobYeUaGkUg1w==","shasum":"86a82f43d226c1392c398f85e11cee6b5ae07d29","tarball":"https://registry.npmjs.org/@putout/plugin-apply-maybe/-/plugin-apply-maybe-1.1.0.tgz","fileCount":8,"unpackedSize":5354,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFV/ZY6HXWTLk8advqUSSS0/QJkuJbQnPShRQitmT0G5AiEA3o1WdM22RsFq/BzsStfVxfoSkq1bm6d0FTJOHvKWNQ0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj3sMIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoxsxAAiB8OlFc5absS6SP/+4fC/V6kgqeY3HPWL2fAUB+oSuDUgwut\r\nYr1eZY1TjRMFc+7Zv6won3iwcUubWER1mf7MEx3Zv82oipiENJ1mDcP4AxQZ\r\nMadzNUs54h8bdwlcDXXj+XP1HMgr4AmXRTNv3EUy8GrTEzcU/o3BqOC7iSRu\r\nCSUmXE5Aa+/Qq194QWunIP1lTCv2Ps3Cj6qyFgdHCgGII56e27PuK5T92Gra\r\nTf3p93LgJAgAfkipIDjYZLRymPHxpBAxmJwmvSZBYyZC8YJDjuKgOcG3ecbO\r\nxCQhf6emJeH0cp2PqUCtfkH1JfwG6UQiKnJuELDYBhYwFWuW5UbTlFzvBiTQ\r\nOTpm7GDnwgXvxj1dik2Sx4LkfD3ruIxmynoG4SxTiPC7NmcqdMa857xvLRLa\r\noEe2IeGquMu61Zr20q6G9ssQY+gp2qDZKrXUaKSvn02JXddjSiObQXBdmFDi\r\n8IJ22ZMF/PV/x/kTCN8hJNfi4kOJ6VoNKuJRENzHUx7Be3dej0kBeoFsDlOB\r\nS/YAP6V22vzR80fqNbad+Sdhvg8qJGTt86A1KbdxwCnwkfKmCa4Xw6OMf422\r\n4r1Y65MllsSxeM8jag6WxvBxbdckoZjXh0fKwYe/In4gJHLB/C7e+O9p3jGn\r\nAtrn8f3k07TekGz1umgqpQvxWo89KPL2vy0=\r\n=dOTV\r\n-----END PGP SIGNATURE-----\r\n"},"_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/plugin-apply-maybe_1.1.0_1675543303908_0.14186578658222548"},"_hasShrinkwrap":false},"1.2.0":{"name":"@putout/plugin-apply-maybe","version":"1.2.0","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin applies Maybe monad","homepage":"https://github.com/coderaiser/apply-maybe/tree/master/packages/plugin-apply-maybe#readme","main":"lib/index.js","commitType":"colon","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/apply-maybe.git"},"scripts":{"wisdom":"madrun wisdom","test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","apply-maybe-plugin","plugin","apply-maybe"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-n":"^15.2.4","eslint-plugin-putout":"^16.0.0","lerna":"^6.0.1","madrun":"^9.0.0","montag":"^1.2.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=28"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"4ef9391ab01e6131143c1dbbf6a7e7248925038c","bugs":{"url":"https://github.com/coderaiser/apply-maybe/issues"},"_id":"@putout/plugin-apply-maybe@1.2.0","_nodeVersion":"18.14.2","_npmVersion":"9.1.3","dist":{"integrity":"sha512-+P8KBUjs1hBNvkyZ7zlY19txNluuHdcyi2V7hlVn8/yaBtiwsvt8UJWyUOCaL5NX4ViZpyO1Dmaep5rkyZ2r4w==","shasum":"ddc110fa517cec7028b7e09a439ee114d322edc2","tarball":"https://registry.npmjs.org/@putout/plugin-apply-maybe/-/plugin-apply-maybe-1.2.0.tgz","fileCount":8,"unpackedSize":5352,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDsklP5xhr3CSs2PF9IYjiYBCQyaxGCh5g9uMUIdX3cgIgY5WTzB1zh66Z4RTuIf3pymxHSFzkhAmDmCXQG1+JY1E="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBRBrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSVxAAhiAwj3KWfthb6WLSbNKGElgr6oliKD8s1iQsnArMuUf7VGFz\r\nmzlcBtKUP4v2O0cLbmY8YziNkqdLEKaaeqCvTeF1Oj3ky84hbuCIoi9lcUW4\r\nTyMAo/1gHtITfrgQ3ctfBIRTql2H8nChsl4uc7HOQPGkKuIc9auVgtGcJoAc\r\nYDV+gbR8MX0Uv8ZZCgkJD7ZacHf7snlGA+X7l7vPsp7zxFWXRTmRHyQT7z0W\r\n6GX/A42wXBEBu3Bkubo5TuYamSHwE0a0+QwS5y0SzjNL4NMS37MybtV1fW5V\r\noB7DPiumU0qGSM3kzWoNfkcliuiLXuN/XcQ/KC8P0wYkHpt5RMgNB6Y+sPGo\r\nkjA2GtoddeZ70BSTxy7RkxrIVB7bptjIJ8CQpj+WNhawU29pbd1S2X+9Xsxm\r\nyabGnM/wbOYQQXnKTj1crY8KBsdHAOfpVn1l7IM22bXgrh10NdyYFstJT+bR\r\nrAOkDcCfKOjEQMOoK7qBI6OUmaqmK37cFSyQSlcvLxTqm2Zc/bSuBBEfhxoM\r\nDO6/ygrw5Y+yA4OOt385s9OH8ODI7D4YMnCga9Lghq0UZbxeMUQMRvKrim+3\r\nKMxSeeQKFc0HM8FKHOQHE0JhSTJNAkI8URMwHMRGg/Gy4wDTlOKHX+QXafaT\r\nkC8Xvt6vHTGFHy98OTETpqMb/9ZUynqV3xI=\r\n=vfDW\r\n-----END PGP SIGNATURE-----\r\n"},"_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/plugin-apply-maybe_1.2.0_1678053483140_0.27372073200575064"},"_hasShrinkwrap":false},"1.2.1":{"name":"@putout/plugin-apply-maybe","version":"1.2.1","type":"commonjs","author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"description":"🐊Putout plugin applies Maybe monad","homepage":"https://github.com/coderaiser/apply-maybe/tree/v28.19.2/packages/plugin-apply-maybe#readme","main":"lib/index.js","commitType":"colon","release":false,"tag":false,"changelog":false,"repository":{"type":"git","url":"git://github.com/coderaiser/apply-maybe.git"},"scripts":{"wisdom":"madrun wisdom","test":"madrun test","watch:test":"madrun watch:test","lint":"madrun lint","fresh:lint":"madrun fresh:lint","lint:fresh":"madrun lint:fresh","fix:lint":"madrun fix:lint","coverage":"madrun coverage","report":"madrun report"},"dependencies":{},"keywords":["putout","apply-maybe-plugin","plugin","apply-maybe"],"devDependencies":{"@putout/test":"^5.0.0","c8":"^7.5.0","eslint":"^8.0.1","eslint-plugin-n":"^15.2.4","eslint-plugin-putout":"^16.0.0","lerna":"^6.0.1","madrun":"^9.0.0","montag":"^1.2.1","nodemon":"^2.0.1"},"peerDependencies":{"putout":">=28"},"license":"MIT","engines":{"node":">=16"},"publishConfig":{"access":"public"},"gitHead":"8445191757211bba1451166b5e454a4fdc2467b0","bugs":{"url":"https://github.com/coderaiser/apply-maybe/issues"},"_id":"@putout/plugin-apply-maybe@1.2.1","_nodeVersion":"18.14.2","_npmVersion":"9.1.3","dist":{"integrity":"sha512-fgQVlubeFtehkH3ooW0bSProcLKTJC9KIMyW+rx8+pRBSFKOgwY0A3FRzYcD9O62HUej3TRzZ9h4vwN2Xp3Iew==","shasum":"cf57f1083b667909149fa389211e047800579c75","tarball":"https://registry.npmjs.org/@putout/plugin-apply-maybe/-/plugin-apply-maybe-1.2.1.tgz","fileCount":8,"unpackedSize":5396,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAe2wIf9VoX6TenDdom+9rsAmA0qNNTCLNsh5kCwj0bAIgRNP/De7d/utjsEXBiTLEW+WHZ0/OMR3BZPSSecU02e8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBv9EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoArw/9GKVtc/gYfT6Hi9ai/vBFNUc5YH9uKAf+vQQH9bALOGiA/wDY\r\ndk2fptWQBPTEKUrY76lHGWRsN8oP0nBNpZcBu7vN8y8EK0M4Tclp7YHiSXn7\r\nxa2ZXPDGa0DcdeEymB8YAHKumt6gaWAJfeZxCTJ2wM1qHuOJGzr3Mya7rzPi\r\nTRCCrBXDfJx/1Vy78efVgUVpCovKesP1pjMeH46iv1uocoiWEdGtSp5F03nG\r\ntIQppP15rJdFmwOuLDJ0sjZyW+aytzZEMK5wcGWNRn9n4PPvS1152e1XEQJD\r\nrxeRxvRMbm1FkMNlHGhdy/s6Ip8RYUA5zQzZ5wDZvU+grcPXXSyu+51beDRK\r\niN1sKsAxRJrKRVY5QREpdwHZz2WDqhdpVPbsEaiPyh20JDyAh0nqfhc0XSvm\r\n0CDLuqHsuGuBtgSLvnqVfIXOydUQeFSbjbPuyF1B2p2Yo8qR/GM0NkQTaLQ3\r\nIsOmrIXax47+tmaBoc2X2qTePyo/tDwLG7x/qVklsf2Y6mn0x6LvV1gw/kmo\r\nipBkbt3XWfNs9XMzHVVCQpdqvbCELf1ekdrk4ILirOP8EVkrX1vnoFnyvEta\r\nC8wpsgi9llHAaikEwKcds4/q0jQo0q7FEZovh4uDqaSkG/Ft028e6Helk+D9\r\nBRRcFAAY43Vs2OLNE9/1ET6Ml1khc7z+VFw=\r\n=Vmf6\r\n-----END PGP SIGNATURE-----\r\n"},"_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/plugin-apply-maybe_1.2.1_1678180163916_0.3497037955961142"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-04T19:52:57.893Z","1.0.0":"2023-02-04T19:52:58.156Z","modified":"2023-03-07T09:09:24.188Z","1.1.0":"2023-02-04T20:41:44.053Z","1.2.0":"2023-03-05T21:58:03.316Z","1.2.1":"2023-03-07T09:09:24.056Z"},"maintainers":[{"name":"coderaiser","email":"mnemonic.enemy@gmail.com"}],"description":"🐊Putout plugin applies Maybe monad","homepage":"https://github.com/coderaiser/apply-maybe/tree/v28.19.2/packages/plugin-apply-maybe#readme","keywords":["putout","apply-maybe-plugin","plugin","apply-maybe"],"repository":{"type":"git","url":"git://github.com/coderaiser/apply-maybe.git"},"author":{"name":"coderaiser","email":"mnemonic.enemy@gmail.com","url":"https://github.com/coderaiser"},"bugs":{"url":"https://github.com/coderaiser/apply-maybe/issues"},"license":"MIT","readme":"# @putout/plugin-apply-maybe [![NPM version][NPMIMGURL]][NPMURL]\n\n[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-apply-maybe.svg?style=flat&longCache=true\n[NPMURL]: https://npmjs.org/package/@putout/plugin-apply-maybe\"npm\"\n\n🐊[**Putout**](https://github.com/coderaiser/putout) plugin helps with `maybe` monad. Depends on [`@putout/declare`](https://github.com/coderaiser/putout/tree/master/packages/plugin-declare#readme). Renamed to [`@putout/plugin-maybe`](https://www.npmjs.com/package/@putout/maybe).\n\n## Install\n\n```\nnpm i @putout/plugin-apply-maybe -D\n```\n\n## Rules\n\n```json\n{\n    \"rules\": {\n        \"apply-maybe/array\": \"on\",\n        \"apply-maybe/empty-array\": \"on\",\n        \"apply-maybe/fn\": \"on\"\n    }\n}\n```\n\n## array\n\n### ❌ Example of incorrect code\n\n```js\nconst array = isArray(a) ? a : [a];\n```\n\n### ✅ Example of correct code\n\n```js\nconst maybeArray = (a) => isArray(a) ? a : [a];\nconst array = maybeArray(a);\n```\n\n## empty-array\n\n### ❌ Example of incorrect code\n\n```js\nconst array = !a ? [] : a;\n```\n\n### ✅ Example of correct code\n\n```js\nconst maybeArray = (a) => !a ? [] : a;\nconst array = maybeEmptyArray(a);\n```\n\n## fn\n\n### ❌ Example of incorrect code\n\n```js\nconst fn = isFn(a) ? a : () => {};\n```\n\n### ✅ Example of correct code\n\n```js\nconst noop = () => {};\nconst maybeFn = isFn(a) ? a : noop;\nconst fn = maybeFn(a);\n```\n\n## noop\n\n### ❌ Example of incorrect code\n\n```js\nconst fn = f || (() => {});\n```\n\n### ✅ Example of correct code\n\n```js\nconst noop = () => {};\nconst fn = fn || noop;\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}