{"id":30872967,"url":"https://github.com/falcao-g/numerize","last_synced_at":"2025-10-15T20:10:53.737Z","repository":{"id":247535619,"uuid":"826115231","full_name":"falcao-g/numerize","owner":"falcao-g","description":"numerize is a very useful package that converts words to numbers","archived":false,"fork":false,"pushed_at":"2025-01-20T22:59:01.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T22:47:47.356Z","etag":null,"topics":["float","integer","numerize","words-to-numbers"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/falcao-g.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-09T06:04:05.000Z","updated_at":"2025-01-20T23:23:20.000Z","dependencies_parsed_at":"2025-09-07T22:47:36.147Z","dependency_job_id":"698d694e-31c2-4304-84ad-6867f14e0079","html_url":"https://github.com/falcao-g/numerize","commit_stats":null,"previous_names":["falcao-g/numerize"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/falcao-g/numerize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fnumerize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fnumerize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fnumerize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fnumerize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/falcao-g","download_url":"https://codeload.github.com/falcao-g/numerize/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/falcao-g%2Fnumerize/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007499,"owners_count":26084313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["float","integer","numerize","words-to-numbers"],"created_at":"2025-09-07T22:47:25.089Z","updated_at":"2025-10-15T20:10:53.720Z","avatar_url":"https://github.com/falcao-g.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e NUMERIZE \u003c/h1\u003e\n\n\u003e **Numerize is a very useful package that converts words to numbers**\n\n\u003cp align=\"center\"\u003e\n    \t\u003ca href=\"https://www.npmjs.com/package/numerize\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/numerize.svg?maxAge=3600\" alt=\"npm version\" /\u003e\u003c/a\u003e\n\t\t\u003ca href=\"https://www.npmjs.com/package/numerize\"\u003e\u003cimg src=\"https://img.shields.io/npm/dt/numerize.svg?maxAge=3600\" alt=\"npm downloads\" /\u003e\u003c/a\u003e\n\t\t\u003ca href=\"https://jsr.io/@falcao/numerize\"\u003e\u003cimg src=\"https://jsr.io/badges/@falcao/numerize\" alt=\"jsr version\" /\u003e\u003c/a\u003e\n\t\t\u003ca href=\"https://jsr.io/@falcao/numerize\"\u003e\u003cimg src=\"https://jsr.io/badges/@falcao/numerize/score\" alt=\"jsr score\" /\u003e\u003c/a\u003e\n        \u003ca title=\"Stars\" href=\"https://github.com/falcao-g/falbot\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/stars/falcao-g/numerize\" alt=\"Stars\"\u003e\n    \u003c/a\u003e \n\u003c/p\u003e\n\n## **✨ Why Numerize?**\n\n- Easy to use \u0026 complete.\n- Extremely useful to game-related projects.\n- Customizable.\n- Comes with 0 dependencies.\n\n## **⚙️ Installation**\n\n```bash\nnpm i numerize\n```\n\nor\n\n```bash\ndeno add jsr:@falcao/numerize\n```\n\n## **📚 Usage**\n\nNumerize is as easy to use as the following examples:\n\n```js\nconst { numerize } = require(\"numerize\")\n\nconsole.log(numerize(\"10%\", 100)) // 10\nconsole.log(numerize(\"1m\")) // 1000000\nconsole.log(numerize(\"half\", 1000)) // 500\nconsole.log(numerize(\"all\", 1000)) // 1000\nconsole.log(numerize(\"1.000\")) // 1000\n```\n\nAdditionally, you can use the `numerizef` function if you want to return the number as a float:\n\n```js\nconst { numerizef } = require(\"numerize\")\n\nconsole.log(numerizef(\"33%\", 2001, \"no\")) // 660.33\nconsole.log(numerizef(\"33%\", 2001, \"round\")) // 660\nconsole.log(numerizef(\"33%\", 2001, \"up\")) // 661\nconsole.log(numerizef(\"33%\", 2001, \"down\")) // 660\n```\n\nThis is very useful when reading inputs from users in a game, like a discord bot for example, when you want to ask the user how much money they want to spend, they can answer a number, a percentage, \"all\", \"half\", 1m, 1k, etc.\n\nYou can also add custom words and suffixes to the numerize function:\n\n```js\nconst { numerize, addWords, addSuffixes } = require(\"numerize\")\n\naddWords({\n\tquarter: 25,\n\tthird: 33,\n})\n\naddSuffixes({\n\tc: 100,\n\td: 12,\n})\n\nconsole.log(numerize(\"quarter\", 100)) // 25\nconsole.log(numerize(\"third\", 100)) // 33\nconsole.log(numerize(\"1c\")) // 100\nconsole.log(numerize(\"1d\")) // 12\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcao-g%2Fnumerize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffalcao-g%2Fnumerize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffalcao-g%2Fnumerize/lists"}