{"_id":"@salesvista/stateless-validation","_rev":"27-8ae1c3104db1deaf7309a6cd3df2b75f","name":"@salesvista/stateless-validation","dist-tags":{"latest":"3.1.0"},"versions":{"1.3.0":{"name":"@salesvista/stateless-validation","version":"1.3.0","license":"ISC","_id":"@salesvista/stateless-validation@1.3.0","maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"}],"contributors":[{"name":"nexdrew"},{"name":"broanius"}],"homepage":"https://github.com/SalesVista/stateless-validation#readme","bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"dist":{"shasum":"ab835a12bc81910d927c6be8cb86c59bdb3a9686","tarball":"https://registry.npmjs.org/@salesvista/stateless-validation/-/stateless-validation-1.3.0.tgz","fileCount":5,"integrity":"sha512-/K18u4QySdASdvk2b5XObgfVWK/x7HiuOdJ+7I3HbZE1u4jmHI/VDrifQOHH7FCd8E+mEem/AYhxD6RU8ywmog==","signatures":[{"sig":"MEQCIG1k+2w+P9j0MW5nlDmBa6t6vUxjKq7OHCTY0GnI4yRJAiAdCeRiJXr9ox+sglNeFqaaO5YJIJuTHVujuTM8GkNzwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6165,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNgN4CRA9TVsSAnZWagAAsnUP/10W9m49XMe9lZLw2Kl8\nA2TGDi0H9phUIj1tx75oCYJWYLyhKZrbaNresDQFfm2bp04KwiEu3Lu2m6Hf\nxkfpPEoCOQLVLF2rZsu1AaXa+uZ6lfyUmT/Gl4/cz1XZEwGtwLDxVZJw5b7Y\nMVEQHRrFqUy8zDF8Ytw9H+6Cq1g4j5XKKzM+qlXkyEfGbT852aUE8PZGWPxp\n5O1YqJinG8Fnyo/d2D3gJxC3mlkZCL6xJS/BiOCC42I35NNxGuUd2kZLkb/t\nj31k9iTpx3MVvAZdalAi18ZMcvvLcBXVwoW1027XvkRnTZ+/ir38mxwfz8hb\nAegwcgWXWUFVNETD+wZcuz64pykhpu3Hea4hv2OMCNTL9XZicK6ISre6CNoW\nQNqvGDN9VSCyVfM47TUvluJgvEfdcBR0dODtYxLkS3AO6gqcXQNEwJomUAG5\n58ofMl0OHUZStxdbKI8bq6xw4dAlsYH28+BC0toZIe+u2rmu92Qk6WpMBvUV\nM7QOULwggMKqJY1moLJr4wq6ngG95W3nj71ZzC8A1Rq6BFB9nqot+LMj9aeN\nEw2pP3zLGfCTIeXDYYoQ+xCb87YwkX/DH76CU65PHJyhbH5rZwkHJZPl7BCh\nYLvGouiLAMdDRt50lo5HZBsXej0FZnwg281b4VfgGWH91Cj0O1/kmKvVhNse\nrSd8\r\n=tHgC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"presets":["env"]},"gitHead":"3c339d69ca6a59e3275737012fadae49be516f6f","scripts":{"test":"tap --cov test.js","prepare":"babel src -d lib","pretest":"standard && npm run prepare","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"_npmVersion":"6.5.0","description":"Reusable validation logic as pure functions","directories":{},"_nodeVersion":"10.15.0","dependencies":{"email-addresses":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","standard":"^12.0.1","babel-cli":"^6.26.0","coveralls":"^3.0.2","babel-preset-env":"^1.7.0","standard-version":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/stateless-validation_1.3.0_1547043704102_0.40564840867815666","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@salesvista/stateless-validation","version":"1.3.1","license":"ISC","_id":"@salesvista/stateless-validation@1.3.1","maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"}],"contributors":[{"name":"nexdrew"},{"name":"broanius"}],"homepage":"https://github.com/SalesVista/stateless-validation#readme","bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"dist":{"shasum":"d5e0ebc23ebda41d7138540208257be483faec76","tarball":"https://registry.npmjs.org/@salesvista/stateless-validation/-/stateless-validation-1.3.1.tgz","fileCount":5,"integrity":"sha512-KoB0T2daqYit/suRQv7stvS1NWd1yWoF04Xlj7JVVZC4Obgo2XZw/1SVva1VaFsii3mVKtfntSt3K+APgFfjSg==","signatures":[{"sig":"MEQCIG13JhiKl1kRyDN09Uool1w3kp7TihBIPp7vZfQuGxplAiBtnSSi+7U5sDPvKeziiJSH8pxBHwlVhp+PfKuwSltT8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6526,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNmiHCRA9TVsSAnZWagAAj3oP/iVOcCREPy29I2yfDkRn\nX1ItDt49WNHvA9ip4Zj8C5N68i4KVBaKaaM/REqlpIg46gAPMZgvxSUK+lrd\nQusUCfAsnYUS4eJpSIFmDCZssHBHdrjs4UCPWYbKmep30Shf676sIjEeqyJS\n/QYraqkdGt3K1FpnyK/XsYOo3qdx8lsnGLM7LqXlDzhzDBGUk/DJmCijm7DO\npJ4d9+fwZ22E+W88BVFh8KY4nl7bdSj2J149emOOl9Tg37Grjm4eDBOn19mc\n3qWftBN+M1ESQiksS4/nnxfHk6bNmtZ29yTMdLV9MfoUJHqcTwK5mJtg2vD7\nFvshhbiEgsn5eehPVgthUoISHqEHfoASFD2RcDeWsQikwWNr9+0HAYQ+9jmv\nqQrmfjcE3qWYCHG6ZIEAshwBb1PZgYg8zvFxmV9WLEpkO8gor5jbOYR/pa2r\ntN/nr6eu1mJZcD4wm/Pr5ugKVcTpBLU0RdGbtjUeVNSnO83/cKMNsCMRcR1X\nMbb5E0KSq0Y7wAkBzcx40303kmeXBewEAzo5hoPIK4epqQAI6tytIQEYq45B\nau/7TBjsCdFf6hoXXwLdTJBV+0N6uh8Hp2DqJvqJluiExfEdoTDUTm2KsaZr\nRNbYjN6JyAN4VyM+4P4ZikpCm7VmAJSgntHfxAo2vmahu9fRVuyi9oVv3m/2\nQwfZ\r\n=IDi5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"presets":["env"]},"gitHead":"5febabea825af6b32571571f542095ff0b1c7913","scripts":{"test":"tap --cov test.js","prepare":"babel src -d lib","pretest":"standard && npm run prepare","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"_npmVersion":"6.5.0","description":"Reusable validation logic as pure functions","directories":{},"_nodeVersion":"10.15.0","dependencies":{"email-addresses":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","standard":"^12.0.1","babel-cli":"^6.26.0","coveralls":"^3.0.2","babel-preset-env":"^1.7.0","standard-version":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/stateless-validation_1.3.1_1547069575078_0.05052032036425547","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@salesvista/stateless-validation","version":"1.4.0","license":"ISC","_id":"@salesvista/stateless-validation@1.4.0","maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"}],"contributors":[{"name":"nexdrew"},{"name":"broanius"}],"homepage":"https://github.com/SalesVista/stateless-validation#readme","bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"dist":{"shasum":"6cca8480307f9da7d1a71caa2e80b7fec1f1713c","tarball":"https://registry.npmjs.org/@salesvista/stateless-validation/-/stateless-validation-1.4.0.tgz","fileCount":5,"integrity":"sha512-YFj+qtoBtiC5OkYi7/Hz0TtHmF1blJ2psU+GIU7sHUOgUeyzZRAzc//sUtILMErm4j9upUfUxrX2uANeOsx17Q==","signatures":[{"sig":"MEQCIBCX35i3dYPsllqGV4ppdMcJx732YLdeTnyXNepVF8qdAiBTC5rcGPn+hro5DVKi6bOYqb9Ml46Sh3qKj8EVaV10qA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQNx5CRA9TVsSAnZWagAAuYwP/jkj3TvWRYfDJKbRcUvf\nmn9cphYRghSj62tm9bx++c1/K2s0kZ12OLoF3+wSJGSfmzdFnsEKsFOfB61c\nvr9E1rw3jPLcMoS1MzFQXeRDCtYlydntKL98Q0X2H6VIplSHsSmyn7jfJgSD\nZtoN7QNrhDbP+SwNsS3H+qcOaIRW9p7kCijcZvxaZak6dkJazUclKKPp3xHr\nCV22A/xG9mXMReIPiPLeMqugs7lvrATzzyGSdTIKi8UG/s4aukte++lrzzVL\nUSSr3n6nQpiso6iEgKw/qrjxSiFPamdhnAy2bfvfsX22oSfsj5CyJmZcT1ij\nfnHNlMkcnaxbwQLzvFXJldvScNVVgPMbIULuvh5VX5Zw00VuRvFAfbBShRTx\nrAZ62M9CR/gI30fhoYS2vJB2tb0/IjkeqsC9Z9E8WDpNSqVPOGXWqeCEfIZx\nBF0hC+hW7uWWWA+/eCe2cZ0qRUSK+ponIbo6IpeYJfAvT+dS48dzKWQlPlMP\nAQ0JpoIuWHWdIX1KCmWmDnLKzLuR8UB6oixT4M0H9B8ot1xjqdIVuh9w8KcP\nmGB3zpjIRXUpUq3R55yoJ0lC5R3GH89ZiUvzxHN05l+9w4dFNDHgWgZjnJqB\nav6f5uv2qgZC1AdIEdaDM5jjgknVLn17ctJ6ch0m0e6unQIGpRY4oE/Z9bNR\nZznC\r\n=qrr+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"presets":["env"]},"gitHead":"db1789d267f2e2d51cba6b0a5f87cbbc4d03e1e0","scripts":{"test":"tap --cov test.js","prepare":"babel src -d lib","pretest":"standard && npm run prepare","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"_npmVersion":"6.5.0","description":"Reusable validation logic as pure functions","directories":{},"_nodeVersion":"10.15.0","dependencies":{"email-addresses":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","standard":"^12.0.1","babel-cli":"^6.26.0","coveralls":"^3.0.2","babel-preset-env":"^1.7.0","standard-version":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/stateless-validation_1.4.0_1547754617017_0.8634767325555945","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@salesvista/stateless-validation","version":"2.0.0","license":"ISC","_id":"@salesvista/stateless-validation@2.0.0","maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"},{"name":"broanius","email":"broanius@gmail.com"},{"name":"mqsmith","email":"smith.mike@mac.com"},{"name":"jesse_howard_schimmel","email":"jesse@salesvista.com"},{"name":"kylescarbx","email":"kyle.scarbx@gmail.com"}],"contributors":[{"name":"nexdrew"},{"name":"broanius"}],"homepage":"https://github.com/SalesVista/stateless-validation#readme","bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"dist":{"shasum":"6be39f965b3aaf0a7e0dbba8a95d7f3c6a3b95ee","tarball":"https://registry.npmjs.org/@salesvista/stateless-validation/-/stateless-validation-2.0.0.tgz","fileCount":4,"integrity":"sha512-ONPIldPKj1sak763u9n1wERWp7EizKdgL7K6LUgExBYsNjIeIq9Tl+5wQx4ogCnmvF8oTB8NmI+UK3L5ofdQpA==","signatures":[{"sig":"MEUCIQDfZaMWKvtcsj7nDSIUO+g0DpksCUDROBQ3fENmWXUYJAIgLufkXf3XCx1o8qips01lJjlDb+JE5t204xvj+ghN5wA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7yvlCRA9TVsSAnZWagAAuMIQAJ1m8OE+vfYtSEP7hlHG\nQ2DGUi8KcN4F5AX2V1EBMCOAlXOJpmjcf8PudVRdvNUherToUxVcLF9fFu9u\nYL6UqmjU6ZwcVte2HOTz9i+0cTC7uJ2Nut31BiDAapKkbCxJngL5U3l8FCBX\nvWzpTzkRZGwFhBqfHR7HuCmutLp9g4pwjb4wqL31+WFmW7t/PfL2jBV3oYSz\nUPG00oA3apuSRaXIiiV71cusKnwD8FFgPYr9bLdesETvGRmj6nKpB9gfpQKH\nnZLJkkaGtX3b3jn1ND+wPaTinlsNrd3aAkKqexZpIQSeFiZhO+4j+gGSQchL\nUDYKrom0EHCnnFXTNUN7uZhvmGeZDOEXpkzJ9uw5C9t/BNYB6Sk1YS0ZfLXE\nJiasUXSRWHJqjEUEOqmap1nksiaoKHy+wvTIQgrR42Wa+ZoPJOXbHQLK2nZ/\n6NkLVTDFvVEWz1E+dljR3CaSzi2hojeumWIQKqHiXf7Y/R2nAuOul8p/r/SK\ntveHPrvVTXzDzw+lvL9Lvm++Lbl5PGvrYywe5eFFyyqi1fGtS6XoA7H45wQJ\ng+V/cCWaMfzIEJdOUsHLL1Zq9cc/yETY6v9LlXe22L+C2dRiJqUq5vf1DpjQ\nkHbHj30RfeTCLK/izPJdIP+YcuRcureA8BMeZhbC1EAoVBHQjCU+pv6bEDq2\nnC4E\r\n=2lRS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","babel":{"presets":["env"]},"gitHead":"e62268c3ac76b9f1d0a63c879fa30196b4bbd37c","scripts":{"test":"tap --cov test.js","prepare":"babel src -d lib","pretest":"standard && npm run prepare","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"_npmVersion":"8.3.1","description":"Reusable validation logic as pure functions","directories":{},"_nodeVersion":"14.18.3","dependencies":{"email-addresses":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","standard":"^12.0.1","babel-cli":"^6.26.0","coveralls":"^3.0.2","babel-preset-env":"^1.7.0","standard-version":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/stateless-validation_2.0.0_1643064293449_0.3082396380454979","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"@salesvista/stateless-validation","version":"3.0.0","license":"ISC","_id":"@salesvista/stateless-validation@3.0.0","maintainers":[{"name":"nat_sierra","email":"arreisnahtan@gmail.com"},{"name":"nexdrew","email":"andrewbgoode@gmail.com"},{"name":"broanius","email":"broanius@gmail.com"},{"name":"kylescarbx","email":"kyle.scarbx@gmail.com"}],"contributors":[{"name":"nexdrew"},{"name":"broanius"}],"homepage":"https://github.com/SalesVista/stateless-validation#readme","bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"dist":{"shasum":"9eb0a0cd6db0efc7cb0eb06d5648527ad74a1bfd","tarball":"https://registry.npmjs.org/@salesvista/stateless-validation/-/stateless-validation-3.0.0.tgz","fileCount":4,"integrity":"sha512-aXtaEcYIQOXvhprErnePF3mjSHqY3ANJE6Qu6RdNzXXYVuOjvO1WdYalwMmNbjrvRNyi5sQM7hMc5BVrUDlctQ==","signatures":[{"sig":"MEQCIHCQV1CRE9HMoNZEP7gG4v7ZWuWS2fkCmUbzm1Wzx6B3AiB7yKldlhGUtwyiBL8Ou8pX1ccLLX3H6Co7q5nhSXhwzQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7231},"main":"lib/index.js","babel":{"presets":["env"]},"gitHead":"4f7e8b16bc9981adc1c5a1010ab34087daaa5ba0","scripts":{"test":"tap --cov test.js","prepare":"babel src -d lib","pretest":"standard && npm run prepare","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"nexdrew","email":"andrewbgoode@gmail.com"},"repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"_npmVersion":"10.2.1","description":"Reusable validation logic as pure functions","directories":{},"_nodeVersion":"20.9.0","dependencies":{"email-addresses":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","standard":"^12.0.1","babel-cli":"^6.26.0","coveralls":"^3.0.2","babel-preset-env":"^1.7.0","standard-version":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/stateless-validation_3.0.0_1732133818198_0.5569479291414419","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@salesvista/stateless-validation","version":"3.1.0","license":"ISC","_id":"@salesvista/stateless-validation@3.1.0","maintainers":[{"name":"nexdrew","email":"andrewbgoode@gmail.com"},{"name":"broanius","email":"broanius@gmail.com"},{"name":"kylescarbx","email":"kyle.scarbx@gmail.com"},{"name":"nat_sierra","email":"arreisnahtan@gmail.com"}],"contributors":[{"name":"nexdrew"},{"name":"broanius"}],"homepage":"https://github.com/SalesVista/stateless-validation#readme","bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"dist":{"shasum":"d0a06c7c3b7d650af37cb97de83de2e1ef6ccd66","tarball":"https://registry.npmjs.org/@salesvista/stateless-validation/-/stateless-validation-3.1.0.tgz","fileCount":4,"integrity":"sha512-+0Mhy3z22j72NtZtFPbPQPHfNMD7tpI3tNxSUtLkxc+yZQr3pifvjFLTYH8PMoGTtxz15GQGW7TBsOtpT8vP/g==","signatures":[{"sig":"MEUCIQCCzr54j+aOUr8dKl9xmGqsK7DwsLkaB7MNZ7eOCnWR0wIgOc/ITb9xpjX5BkmMp4PL8nDUMPtV1pZzhZ/LmKf3BU8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8345},"main":"lib/index.js","babel":{"presets":["env"]},"gitHead":"4a05ba0853e8740c8977781316c927aa65bfb586","scripts":{"test":"tap --cov test.js","prepare":"babel src -d lib","pretest":"standard && npm run prepare","release":"standard-version","coverage":"nyc report --reporter=text-lcov | coveralls"},"_npmUser":{"name":"broanius","actor":{"name":"broanius","type":"user","email":"broanius@gmail.com"},"email":"broanius@gmail.com"},"repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"_npmVersion":"10.9.0","description":"Reusable validation logic as pure functions","directories":{},"_nodeVersion":"20.15.0","dependencies":{"email-addresses":"^3.0.3"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^12.1.1","standard":"^12.0.1","babel-cli":"^6.26.0","coveralls":"^3.0.2","babel-preset-env":"^1.7.0","standard-version":"^4.4.0"},"_npmOperationalInternal":{"tmp":"tmp/stateless-validation_3.1.0_1750201274767_0.19797514005582562","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2019-01-09T14:21:44.005Z","modified":"2025-08-04T16:45:04.979Z","1.3.0":"2019-01-09T14:21:44.230Z","1.3.1":"2019-01-09T21:32:55.198Z","1.4.0":"2019-01-17T19:50:17.122Z","2.0.0":"2022-01-24T22:44:53.615Z","3.0.0":"2024-11-20T20:16:58.363Z","3.1.0":"2025-06-17T23:01:14.921Z"},"bugs":{"url":"https://github.com/SalesVista/stateless-validation/issues"},"license":"ISC","homepage":"https://github.com/SalesVista/stateless-validation#readme","repository":{"url":"git+https://github.com/SalesVista/stateless-validation.git","type":"git"},"description":"Reusable validation logic as pure functions","contributors":[{"name":"nexdrew"},{"name":"broanius"}],"maintainers":[{"email":"andrewbgoode@gmail.com","name":"nexdrew"},{"email":"broanius@gmail.com","name":"broanius"},{"email":"kyle.scarbx@gmail.com","name":"kylescarbx"}],"readme":"# stateless-validation\n\n> Reusable validation logic as pure functions\n\n[![CI Status](https://github.com/SalesVista/stateless-validation/workflows/CI/badge.svg?branch=master)](https://github.com/SalesVista/stateless-validation/actions)\n[![Coverage Status](https://coveralls.io/repos/github/SalesVista/stateless-validation/badge.svg?branch=master)](https://coveralls.io/github/SalesVista/stateless-validation?branch=master)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\nThis package allows us to reuse the same validation logic between the UI/frontend and the REST API/backend.\n\n## Install\n\n```console\n$ npm i --save @salesvista/stateless-validation\n```\n\n```js\n// with babel\nimport sv from '@salesvista/stateless-validation'\n// without babel\nconst sv = require('@salesvista/stateless-validation')\n```\n\n## API\n\n### `sv.isValidSlug(string)`\n\nAccepts a single string and returns a boolean indicating if the given string is a valid URL-friendly slug (i.e. a username).\n\nA slug is valid if it meets the following criteria:\n\n- Starts with a lowercase letter\n- Is 3 to 64 characters long\n- Consists of only lowercase letters, numbers, underscores, or hyphens\n- hyphens can be disabled with option `{ allowHyphen: false }`\n\n### `sv.convertToSlug(string, opts)`\n\nConvert the given string into a valid slug.\n\nAccepts a single string (and an optional object) and returns a string.\n\nThe conversion process includes:\n\n- coercing the argument into a string\n- replacing whitespace with either `'_'` or a given `opts.whitespaceReplacement`\n- removing non-alphanumeric characters\n- converting to lower-case\n- truncating to first 64 characters\n- potentially prepending a portion of `'abc'` or a given `opts.prefix` to make the slug valid\n\nOptions accepted:\n\n- `opts.whitespaceReplacement`: string, default `'_'`\n\n    What to replace any whitespace with. Must make a valid slug to be used. An empty string will remove whitespace.\n\n- `opts.prefix`: string, default `'abc'`\n\n    Used to turn an invalid slug (one not starting with a letter) into a valid slug, by prepending up to 3 characters of this string to the converted value.\n\n- `opts.scroll`: boolean, default `false`\n\n    Use a \"scroll from right\" algorithm when using the prefix to make the slug valid. The default algorithm prepends the entire prefix (when necessary), whereas the \"scroll\" algorithm only prepends a minimal number of characters from the prefix to make the slug valid (i.e. only uses 1 to 3 characters of the prefix instead of the whole thing).\n\n- `opts.allowHyphen`: boolean, default `true`\n\n    When `false`, hyphens are not valid in slugs. `convertToSlug` will replace any hyphen characters using `opts.hyphenReplacement`.\n\n- `opts.hyphenReplacement`: string, default `'_'`\n\n    What to replace hyphens with when `allowHyphen` is `false`. Set to an empty string to remove them entirely.\n\n### `sv.isValidPassword(string)`\n\nAccepts a single string and returns a boolean indicating if the given string is a valid password.\n\nA password is valid if it meets the following criteria:\n\n- Is at least 16 characters long\n\n### `sv.isValidEmail(string)`\n\nAccepts a single string and returns a boolean indicating if the given string is a valid email.\n\nAn email is valid if it meets the following criteria:\n\n- Conforms to the format of _{local-part}@{domain}_\n\n\n## Releasing\n\nAfter one or more PRs have been merged to master, you can cut a new release with the following commands:\n\n```bash\n# update local master branch\ngit checkout master && git pull origin master\n# make sure tests pass\nnpm it\n# bump version, update changelog, and create git tag\nnpm run release\n# push release to github\ngit push -u --follow-tags origin master\nnpm publish --access public\n```\n\nThen you can update the version referenced by any apps/packages that use this as a dependency.\n","readmeFilename":"README.md"}