{"_id":"@ehmpathy/number-fns","name":"@ehmpathy/number-fns","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@ehmpathy/number-fns","author":{"name":"ehmpathy"},"description":"A glossary of intuitive, universally unambiguous **number** resources and mechanisms.","version":"1.0.1","repository":{"type":"git","url":"git+https://github.com/ehmpathy/number-fns.git"},"homepage":"https://github.com/ehmpathy/number-fns","keywords":["number"],"bugs":{"url":"https://github.com/ehmpathy/number-fns/issues"},"license":"MIT","main":"dist/index.js","engines":{"node":">=8.0.0"},"scripts":{"build:ts":"tsc -p ./tsconfig.build.json","commit:with-cli":"npx cz","fix:format:prettier":"prettier --write '**/*.ts' --config ./prettier.config.js","fix:format":"npm run fix:format:prettier","fix:lint":"eslint -c ./.eslintrc.js src/**/*.ts --fix","build:clean":"rm dist/ -rf","build:compile":"tsc -p ./tsconfig.build.json","build":"npm run build:clean && npm run build:compile","test:commits":"LAST_TAG=$(git describe --tags --abbrev=0 @^ 2> /dev/null || git rev-list --max-parents=0 HEAD) && npx commitlint --from $LAST_TAG --to HEAD --verbose","test:types":"tsc -p ./tsconfig.build.json --noEmit","test:format:prettier":"prettier --parser typescript --check 'src/**/*.ts' --config ./prettier.config.js","test:format":"npm run test:format:prettier","test:lint:deps":"npx depcheck -c ./depcheckrc.yml","test:lint:eslint":"eslint -c ./.eslintrc.js src/**/*.ts","test:lint":"npm run test:lint:eslint && npm run test:lint:deps","test:unit":"jest -c ./jest.unit.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')","test:integration":"jest -c ./jest.integration.config.ts --forceExit --verbose --passWithNoTests $([ -z $THOROUGH ] && echo '--changedSince=main')","test:acceptance:locally":"npm run build && LOCALLY=true jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests","test":"npm run test:commits && npm run test:types && npm run test:format && npm run test:lint && npm run test:unit && npm run test:integration && npm run test:acceptance:locally","test:acceptance":"npm run build && jest -c ./jest.acceptance.config.ts --forceExit --verbose --runInBand --passWithNoTests","prepush":"npm run test && npm run build","prepublish":"npm run build","preversion":"npm run prepush","postversion":"git push origin HEAD --tags --no-verify","postinstall":"[ -d .git ] && npm run prepare:husky || exit 0","prepare:husky":"npx husky install && chmod ug+x .husky/*"},"dependencies":{"domain-glossaries":"1.0.0","type-fns":"1.19.0"},"devDependencies":{"@commitlint/cli":"19.3.0","@commitlint/config-conventional":"13.1.0","@trivago/prettier-plugin-sort-imports":"4.3.0","@tsconfig/node-lts-strictest":"18.12.1","@types/jest":"29.2.4","@typescript-eslint/eslint-plugin":"7.8.0","@typescript-eslint/parser":"7.8.0","core-js":"3.26.1","cz-conventional-changelog":"3.3.0","declapract":"0.12.0","declapract-typescript-ehmpathy":"0.39.5","depcheck":"1.4.3","eslint":"8.56.0","eslint-config-airbnb-typescript":"18.0.0","eslint-config-prettier":"8.5.0","eslint-plugin-import":"2.26.0","eslint-plugin-prettier":"4.2.1","husky":"8.0.3","jest":"29.3.1","prettier":"2.8.1","ts-jest":"29.1.3","ts-node":"10.9.2","typescript":"5.4.5"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"_id":"@ehmpathy/number-fns@1.0.1","gitHead":"ec24ef9cf0eb92384daaf1912343c726761fbc57","types":"./dist/index.d.ts","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-zXLZQRG0qBfMXmbZQ+krQcR4FVIghI+nGh+f1cgr3nLFpad9pIt116sXraGYhWtojE8Tq3Vix6TyL8cSaTkGkA==","shasum":"2b00443f10a76ded017e72aa2c0c9b6e94c93cc1","tarball":"https://registry.npmjs.org/@ehmpathy/number-fns/-/number-fns-1.0.1.tgz","fileCount":6,"unpackedSize":11367,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHx+WLyKhysNRtqtyOtMIsj9mXoKzyz5fJcWdho2bsEHAiAQJRaoQ5bZ3b/pVt6IJQpr2+8P61WJmyduzKs5b3CqNw=="}]},"_npmUser":{"name":"uladkasach","email":"UladKasach@gmail.com","actor":{"name":"uladkasach","email":"UladKasach@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"uladkasach","email":"UladKasach@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/number-fns_1.0.1_1750801970400_0.3762209180306144"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-24T21:52:50.319Z","1.0.1":"2025-06-24T21:52:50.578Z","modified":"2025-06-24T21:52:50.857Z"},"maintainers":[{"name":"uladkasach","email":"UladKasach@gmail.com"}],"description":"A glossary of intuitive, universally unambiguous **number** resources and mechanisms.","homepage":"https://github.com/ehmpathy/number-fns","keywords":["number"],"repository":{"type":"git","url":"git+https://github.com/ehmpathy/number-fns.git"},"author":{"name":"ehmpathy"},"bugs":{"url":"https://github.com/ehmpathy/number-fns/issues"},"license":"MIT","readme":"# number-fns\n\n![test](https://github.com/ehmpathy/number-fns/workflows/test/badge.svg)\n![publish](https://github.com/ehmpathy/number-fns/workflows/publish/badge.svg)\n\nA glossary of intuitive, universally unambiguous **number** resources and mechanisms.\n\n# purpose\n\n1. declare an intuitive and stable definition of `number`\n\n2. create a pit of success for number utilization\n\n3. declare a ubiquitious language for\n    - domain objects related to `number`s\n      - Quant\n      - Ratio\n    - procedures related to `number`s\n      - asNumberRounded\n      - etc\n\n# install\n\n```sh\nnpm install number-fns\n```\n\n# use\n\n### `roundToHundredths`\n\n.what = returns a number rounded to the hundredths\n.examples =\n```ts\nasNumberRounded(11.31313) => 11.31\nasNumberRounded(11.31) => 11.31\nasNumberRounded(11.3) => 11.30\nasNumberRounded(11) => 11.00\n```\n\n### `asNumberRounded`\n\n.what = returns a number rounded to a given precision\n.examples =\n```ts\nasNumberRounded(11.31313, 0.01) => 11.31\nasNumberRounded(11.31313, 0.1) => 11.3\nasNumberRounded(11.31313, 1) => 11\nasNumberRounded(11.31313, 10) => 10\nasNumberRounded(11.31313, 100) => 0\n```\n\n### `asNumberFloored`\n\n.what = returns a number floored to a given precision\n.examples =\n```ts\nasNumberFloored(17.31713, 0.01) => 17.31\nasNumberFloored(17.31713, 0.1) => 17.3\nasNumberFloored(17.31713, 1) => 17\nasNumberFloored(17.31713, 10) => 10\nasNumberFloored(17.31713, 100) => 0\n```\n\n### `asPercentWords`\n\n.what = represents a number as a percentage in words\n.examples =\n```ts\nasPercentWords(12.321) => \"1232%\"\n```\n\n### `asNumberWords`\n\n.what = represents a number in words\n\n\n### `Quant`\n\n.what = represents an absolute quantity\n\n\n### `Ratio`\n\n.what = represents a relative ratio\n","readmeFilename":"readme.md","_rev":"1-b7d0d90d8d3a3665cc114a4a937d7262"}