{"_id":"@abdullahdewan/is-even","_rev":"4-7b4b5e32984332ecc0c06e1dd1c9a495","name":"@abdullahdewan/is-even","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@abdullahdewan/is-even","version":"1.0.0","keywords":["even","odd","typescript","utility"],"author":{"url":"https://abdullahdewan.com","name":"Abdullah Dewan","email":"hello@abdullahdewan.com"},"license":"MIT","_id":"@abdullahdewan/is-even@1.0.0","maintainers":[{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"}],"homepage":"https://github.com/abdullahdewan/is-even-demo#readme","bugs":{"url":"https://github.com/abdullahdewan/is-even-demo/issues"},"dist":{"shasum":"8c84e9c7aff45dbd34b9572585199b1e675a3f53","tarball":"https://registry.npmjs.org/@abdullahdewan/is-even/-/is-even-1.0.0.tgz","fileCount":9,"integrity":"sha512-xOe/MJMfTjuXFF+uP8rKRS8nqg8OP/GCuECsZ97kY7dGqlelcxiyFyIX7hGoo19WkYECMr7VpWjgMR7BosyU0w==","signatures":[{"sig":"MEQCIBWo8b8wHw7adkax3Kohxg806Vlgps5jtPu5v0T0YC+9AiA3Sy9YoIGbBTpGy3repfHySBfTpqQ11V5yKT6NRVTIpQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3086},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"75c177faacec75bc0b908a34f152daf41df1ec07","scripts":{"test":"tsx test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"},"repository":{"url":"git+https://github.com/abdullahdewan/is-even-demo.git","type":"git"},"_npmVersion":"11.18.0","description":"A tiny TypeScript utility to check whether a number is even.","directories":{},"_nodeVersion":"26.4.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/is-even_1.0.0_1785189155001_0.6273486835173521","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@abdullahdewan/is-even","version":"1.0.1","keywords":["even","odd","typescript","utility"],"author":{"url":"https://abdullahdewan.com","name":"Abdullah Dewan","email":"hello@abdullahdewan.com"},"license":"MIT","_id":"@abdullahdewan/is-even@1.0.1","maintainers":[{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"}],"homepage":"https://github.com/abdullahdewan/is-even#readme","bugs":{"url":"https://github.com/abdullahdewan/is-even/issues"},"dist":{"shasum":"21ebbfd8aebd6217187af32c7bef0d981346bc43","tarball":"https://registry.npmjs.org/@abdullahdewan/is-even/-/is-even-1.0.1.tgz","fileCount":9,"integrity":"sha512-x2v0iZJAozYdtAUBJOJSZv+ffuMgkY5uINjGntH/rrFV68JHyPr8hEPd8iOn83Bkp4E4Z5OY3yRSw65yRbXFew==","signatures":[{"sig":"MEUCIQDXWxQ6MvFAxYneiWcy9WXbGZyU2nskvVNtcKM5qUf+8gIgBF/9pzS+sez/EChzVc6isLOknj/L55lRJSpXNntk/t4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3071},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"33ea5d2e9567282c4b12e1020b3fc5b1e172f910","scripts":{"test":"tsx test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"},"repository":{"url":"git+https://github.com/abdullahdewan/is-even.git","type":"git"},"_npmVersion":"11.18.0","description":"A tiny TypeScript utility to check whether a number is even.","directories":{},"_nodeVersion":"26.4.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","typescript":"^5.9.2"},"_npmOperationalInternal":{"tmp":"tmp/is-even_1.0.1_1785189396713_0.04401677962137307","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@abdullahdewan/is-even","version":"1.1.0","keywords":["even","odd","typescript","utility"],"author":{"url":"https://abdullahdewan.com","name":"Abdullah Dewan","email":"hello@abdullahdewan.com"},"license":"MIT","_id":"@abdullahdewan/is-even@1.1.0","maintainers":[{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"}],"homepage":"https://github.com/abdullahdewan/is-even#readme","bugs":{"url":"https://github.com/abdullahdewan/is-even/issues"},"dist":{"shasum":"7755e0ba0239e4a89145e1778d2479a2ee2da1dd","tarball":"https://registry.npmjs.org/@abdullahdewan/is-even/-/is-even-1.1.0.tgz","fileCount":9,"integrity":"sha512-GQnE4fGi2ybgbNa3D07JUosKtw6M7l69+CcsHrKT8cafZkxOPx7vrOjC1vQt7Vvy0tyDnOO7959KjHO3PW1X+w==","signatures":[{"sig":"MEUCIQDRVYTt2LARISmZWRGkN/4GjxVXTtWR904i3uLdLxV3SgIgN44dtGevYCGSK8t5r6B8XNT+xIs4p9LvgPXpxjdGu/A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3216},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c9d965c0fd3d8dc00d8956cb8d1c6a025a351073","scripts":{"test":"tsx test.ts","build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"},"repository":{"url":"git+https://github.com/abdullahdewan/is-even.git","type":"git"},"_npmVersion":"11.18.0","description":"A tiny TypeScript utility to check whether a number is even.","directories":{},"_nodeVersion":"26.4.0","_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","typescript":"^5.5.4"},"_npmOperationalInternal":{"tmp":"tmp/is-even_1.1.0_1785200018519_0.8596419189758251","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@abdullahdewan/is-even","version":"1.2.0","description":"A tiny TypeScript utility to check whether a number is even.","type":"module","main":"./dist/index.js","types":"./dist/cjs/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/cjs/index.js"}},"keywords":["even","odd","is-even","is-odd","parity","number","typescript","utility"],"homepage":"https://github.com/abdullahdewan/is-even#readme","bugs":{"url":"https://github.com/abdullahdewan/is-even/issues"},"repository":{"type":"git","url":"git+https://github.com/abdullahdewan/is-even.git"},"license":"MIT","author":{"name":"Abdullah Dewan","email":"hello@abdullahdewan.com","url":"https://abdullahdewan.com"},"scripts":{"test":"tsx test.ts","build":"tsc && tsc -p tsconfig.cjs.json && cp cjs-package.json dist/cjs/package.json","prepublishOnly":"npm run build"},"devDependencies":{"tsx":"^4.23.1","typescript":"^5.5.4"},"gitHead":"19ea37feecd16c8c0c0c76c146a2cdfcddfd1c85","_id":"@abdullahdewan/is-even@1.2.0","_nodeVersion":"24.13.1","_npmVersion":"11.18.0","dist":{"integrity":"sha512-+JAMjh52Xk7YlrWtvR4OKx1qNVhAUhVIdrHGGZ1O8obQU8FIwhXAW/cu9pU91LKBgoAyymkYExANQxQghZ1Lag==","shasum":"c0bfe3d26c5df15f6a580be5bc22d3c8adbf9433","tarball":"https://registry.npmjs.org/@abdullahdewan/is-even/-/is-even-1.2.0.tgz","fileCount":16,"unpackedSize":5350,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHI7P41JRFvLrLYw1wyD2rcjbfK3bo36Z9XafJDUR5K0AiBY6DK+lOWcGDolJ29bRMtjMXi4IAYV/etrbSK50s9Hcg=="}]},"_npmUser":{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"},"directories":{},"maintainers":[{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/is-even_1.2.0_1785420603611_0.5425683199982374"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-27T21:52:34.892Z","modified":"2026-07-30T14:10:04.404Z","1.0.0":"2026-07-27T21:52:35.141Z","1.0.1":"2026-07-27T21:56:36.849Z","1.1.0":"2026-07-28T00:53:38.694Z","1.2.0":"2026-07-30T14:10:03.735Z"},"bugs":{"url":"https://github.com/abdullahdewan/is-even/issues"},"author":{"name":"Abdullah Dewan","email":"hello@abdullahdewan.com","url":"https://abdullahdewan.com"},"license":"MIT","homepage":"https://github.com/abdullahdewan/is-even#readme","keywords":["even","odd","is-even","is-odd","parity","number","typescript","utility"],"repository":{"type":"git","url":"git+https://github.com/abdullahdewan/is-even.git"},"description":"A tiny TypeScript utility to check whether a number is even.","maintainers":[{"name":"abdullahdewan","email":"dewanmohammadabdullah+npmjs.com@gmail.com"}],"readme":"# @abdullahdewan/is-even\n\nA tiny TypeScript utility to determine whether a value is an even or odd integer (including `bigint`).\n\n## Installation\n\n```bash\nnpm install @abdullahdewan/is-even\n```\n\nor\n\n```bash\npnpm add @abdullahdewan/is-even\n```\n\nor\n\n```bash\nyarn add @abdullahdewan/is-even\n```\n\nor\n\n```bash\nbun add @abdullahdewan/is-even\n```\n\n## Usage\n\n### ESM\n\n```ts\nimport { isEven, isOdd } from \"@abdullahdewan/is-even\";\n\nconsole.log(isEven(2)); // true\nconsole.log(isEven(3)); // false\nconsole.log(isEven(10n)); // true\n\nconsole.log(isOdd(3)); // true\nconsole.log(isOdd(2)); // false\nconsole.log(isOdd(7n)); // true\n```\n\n### CommonJS\n\n```js\nconst { isEven, isOdd } = require(\"@abdullahdewan/is-even\");\n\nconsole.log(isEven(4)); // true\nconsole.log(isOdd(5)); // true\n```\n\n## API\n\n### isEven(value)\n\nReturns `true` if the given value is an even integer or an even `bigint`. Returns `false` for any other type of value.\n\n```ts\nisEven(10); // true\nisEven(10n); // true\nisEven(5); // false\nisEven(5n); // false\nisEven(2.5); // false\nisEven(\"2\"); // false\nisEven(null); // false\n```\n\n### isOdd(value)\n\nReturns `true` if the given value is an odd integer or an odd `bigint`. Returns `false` for any other type of value.\n\n```ts\nisOdd(3); // true\nisOdd(7n); // true\nisOdd(4); // false\nisOdd(2n); // false\nisOdd(1.5); // false\nisOdd(\"1\"); // false\nisOdd(null); // false\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}