{"_id":"@alesmenzel/cubic-equation","name":"@alesmenzel/cubic-equation","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@alesmenzel/cubic-equation","version":"1.0.0","description":"Calculate the real roots of cubic formula","license":"MIT","main":"./dist/cubic-equation.js","types":"./dist/cubic-equation.d.ts","author":{"name":"Aleš Menzel","email":"alesmenzel@gmail.com","url":"https://github.com/alesmenzel"},"scripts":{"build":"rm -rf dist && rollup --config rollup.config.js","lint":"eslint .","format":"eslint --fix .","pretest":"run-s lint types","test":"jest --ci --config ./jest/jest.config.js","test:coverage":"jest --ci --config ./jest/jest-coverage.config.js","types":"tsc --noEmit","prepublishOnly":"npm run test","prepare":"husky install"},"engines":{"node":">=12.0.0"},"repository":{"type":"git","url":"git+ssh://git@github.com/alesmenzel/cubic-equation.git"},"devDependencies":{"@babel/core":"^7.17.10","@babel/eslint-plugin":"^7.17.7","@babel/plugin-proposal-class-properties":"^7.16.7","@babel/plugin-transform-runtime":"^7.17.10","@babel/preset-env":"^7.17.10","@babel/preset-typescript":"^7.16.7","@babel/runtime":"^7.17.9","@babel/runtime-corejs3":"^7.17.9","@rollup/plugin-typescript":"^8.3.2","@types/jest":"^28.1.3","@types/rollup-plugin-progress":"^1.1.1","@typescript-eslint/eslint-plugin":"^5.23.0","@typescript-eslint/parser":"^5.23.0","core-js":"^3.22.5","eslint":"^8.15.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^8.5.0","eslint-import-resolver-typescript":"^3.1.0","eslint-plugin-import":"^2.26.0","eslint-plugin-jest":"^26.2.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.0.0","eslint-plugin-promise":"^6.0.0","husky":"^8.0.1","jest":"^28.1.0","lint-staged":"^13.0.3","npm-run-all":"^4.1.5","prettier":"^2.6.2","rollup":"^2.73.0","rollup-plugin-babel":"^4.4.0","rollup-plugin-commonjs":"^10.1.0","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-progress":"^1.1.2","rollup-plugin-terser":"^7.0.2","tslib":"^2.4.0","typescript":"^4.6.4"},"lint-staged":{"*.js":"eslint --cache --fix"},"gitHead":"3587c92720dd51c19392014684312df20a881254","bugs":{"url":"https://github.com/alesmenzel/cubic-equation/issues"},"homepage":"https://github.com/alesmenzel/cubic-equation#readme","_id":"@alesmenzel/cubic-equation@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-aTR/gvVVv14kPAE2NjHkU3oSlQGanbWKBMC/EYAn8L+EaRSAqGXaKk2jHMIg2KDVkdCs8fiSY8NFtENZ/VxVEg==","shasum":"c391fda56101952bd62b55a66ab339d5332c8a1f","tarball":"https://registry.npmjs.org/@alesmenzel/cubic-equation/-/cubic-equation-1.0.0.tgz","fileCount":7,"unpackedSize":10162,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB0f4iG3bZbjAlsdzAMDcJubFw6d7RnTckrkxgu13bdRAiBjiVqhgmirmukqHB5UN1n/qLzwHWwuzggCGbyPPylQ8A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuKG/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmorsA//U0jf9cfhGbX6siWGphjHvbSQog9HyACpGOkn4qZ7o7N4tOGK\r\nqniUGUEqgD3CMZeKMGKteeNbMvj0iSrXud15VmUPpjFdB93N3vwqt1oYvrfN\r\niJb3rzPLQBr2vgpO1IGuR2IsDW+GsnzA7jphyfs6PVO4DepgaNGjnlxSPh8y\r\n5EXbvvov79rM4ldHJ7flfUq/tMWg/haGGdMdVyfQBPprPzruQIyjFvk3TBqM\r\nH906XHslpSagntgIAxnzhV3tz6cOiNEjB1yqNEdyCiobOgRuObLjezkPmCvq\r\neMooVwVAOeGGwCic+dG/M7m2A5zSPincxYOZ4F1ItwPm/81PfgGBInMyZtSL\r\njE+4L5PV7X8Y9+lkXKdoQCB6rg5cJHePyRTZglXJiR1wP3Fej5fkA1i2KHcA\r\nywTNa0C4TkkCipPpmcJul9GF/Djah6/F/wPlEU9aV9zOklNWBZy48al7wVwd\r\ngUnOtk6IuP/5JItfrPTaQuA2VXiNu4pj0mhGVXM4criPWz8KP4hc4ut+iqSA\r\nmJ0V2wt/iRJ8zrDDSgA9xEA/F4W4WQVV3ZHjOdtV18vxdKlWN70rUIF/X4Df\r\n4ZFJizOhk5PxrtsEo8sWJFbastafxvYinY4t86Qy4xwn56bcC9usnGbLvnDR\r\nfkFg+2Yba6AbMPJVDbktcP1eZ/JLOxLZxxo=\r\n=gtdQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alesmenzel","email":"alesmenzel@gmail.com"},"directories":{},"maintainers":[{"name":"alesmenzel","email":"alesmenzel@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cubic-equation_1.0.0_1656267198874_0.4533736569729647"},"_hasShrinkwrap":false}},"time":{"created":"2022-06-26T18:13:18.822Z","1.0.0":"2022-06-26T18:13:19.080Z","modified":"2022-06-26T18:13:19.205Z"},"maintainers":[{"name":"alesmenzel","email":"alesmenzel@gmail.com"}],"description":"Calculate the real roots of cubic formula","homepage":"https://github.com/alesmenzel/cubic-equation#readme","repository":{"type":"git","url":"git+ssh://git@github.com/alesmenzel/cubic-equation.git"},"author":{"name":"Aleš Menzel","email":"alesmenzel@gmail.com","url":"https://github.com/alesmenzel"},"bugs":{"url":"https://github.com/alesmenzel/cubic-equation/issues"},"license":"MIT","readme":"# 🥉 Cubic equation\n\nJavascript implementation calculating roots of cubic equation. Based on [Alexander Shtuchkin's](https://stackoverflow.com/a/27176424) implementation.\n\n## Installation\n\n```bash\nnpm install @alesmenzel/cubic-equation\n```\n\n## Usage\n\n```ts\nimport { calculateCubicRoots } from \"@alesmenzel/cubic-equation\"\n\n// ax^3 + bx^2 + cx + d = 0\nconst a = 1\nconst b = 2\nconst c = 3\nconst d = 4\ncalculateCubicRoots(a, b, c, d)\ncalculateCubicRoots(a, b, c, d, {\n  isZero(value) {\n    return value === 0 // or use the default that treats numbers < 1e10 as zeros\n  }\n})\n```\n","readmeFilename":"README.md"}