{"id":28716313,"url":"https://github.com/tomfanhm/newtype","last_synced_at":"2026-05-06T17:34:37.144Z","repository":{"id":253773608,"uuid":"844485600","full_name":"tomfanhm/newtype","owner":"tomfanhm","description":"A TypeScript library packed with handy functions designed to accelerate development across different platforms.","archived":false,"fork":false,"pushed_at":"2024-09-21T22:12:48.000Z","size":542,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T03:41:34.952Z","etag":null,"topics":["development","javascript","library","nodejs","tools","typescript","typescript-library","utility","web-development"],"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/tomfanhm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-08-19T11:07:53.000Z","updated_at":"2024-09-21T22:12:52.000Z","dependencies_parsed_at":"2024-09-16T11:04:16.917Z","dependency_job_id":"37e0149c-f648-4b12-9738-db07dbb5f5a1","html_url":"https://github.com/tomfanhm/newtype","commit_stats":null,"previous_names":["tomfanhm/newtype"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomfanhm/newtype","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfanhm%2Fnewtype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfanhm%2Fnewtype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfanhm%2Fnewtype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfanhm%2Fnewtype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomfanhm","download_url":"https://codeload.github.com/tomfanhm/newtype/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomfanhm%2Fnewtype/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32704539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["development","javascript","library","nodejs","tools","typescript","typescript-library","utility","web-development"],"created_at":"2025-06-15T02:39:51.308Z","updated_at":"2026-05-06T17:34:37.129Z","avatar_url":"https://github.com/tomfanhm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# newtype\n\n**newtype** is a comprehensive TypeScript library designed to streamline common programming tasks. This library offers a rich set of utilities spread across multiple domains such as arrays, strings, mathematics, dates, and system operations.\n\n## Installation\n\nInstall **newtype** using npm:\n\n```bash\nnpm install newtype\n```\n\nOr using yarn:\n\n```bash\nyarn add newtype\n```\n\nOr using pnpm:\n\n```bash\npnpm add newtype\n```\n\n## Usage\n\nAfter installing **newtype**, you can import and use various utilities from the library in your TypeScript or JavaScript projects. Here's how you can include these utilities:\n\n```javascript\n// Importing specific functions directly from the main module (Larger size)\nimport { bubbleSort, unique } from \"newtype\"\n// Importing specific functions from the 'array' module using ES Modules\nimport { bubbleSort, unique } from \"newtype/array\"\n// Importing specific functions from the 'array' module using CommonJS\nconst { bubbleSort, unique } = require(\"newtype/array\")\n```\n\n## Modules\n\nExplore detailed documentation for each module:\n\n### Array\n\n- [all](src/array/all/README.md)\n- [any](src/array/any/README.md)\n- [bubbleSort](src/array/bubble-sort/README.md)\n- [chunk](src/array/chunk/README.md)\n- [compact](src/array/compact/README.md)\n- [heapSort](src/array/heap-sort/README.md)\n- [insertionSort](src/array/insertion-sort/README.md)\n- [intersection](src/array/intersection/README.md)\n- [mergeSort](src/array/merge-sort/README.md)\n- [partition](src/array/partition/README.md)\n- [permutations](src/array/permutations/README.md)\n- [quickSort](src/array/quick-sort/README.md)\n- [range](src/array/range/README.md)\n- [sample](src/array/sample/README.md)\n- [selectionSort](src/array/selection-sort/README.md)\n- [shuffle](src/array/shuffle/README.md)\n- [timSort](src/array/tim-sort/README.md)\n- [unique](src/array/unique/README.md)\n\n### Core\n\n- [buildUrl](src/core/build-url/README.md)\n- [createCounter](src/core/create-counter/README.md)\n- [isArray](src/core/is-array/README.md)\n- [isBigInt](src/core/is-big-int/README.md)\n- [isBoolean](src/core/is-boolean/README.md)\n- [isDate](src/core/is-date/README.md)\n- [isError](src/core/is-error/README.md)\n- [isFloat](src/core/is-float/README.md)\n- [isFunction](src/core/is-function/README.md)\n- [isInteger](src/core/is-integer/README.md)\n- [isNull](src/core/is-null/README.md)\n- [isNumber](src/core/is-number/README.md)\n- [isObject](src/core/is-object/README.md)\n- [isString](src/core/is-string/README.md)\n- [isSymbol](src/core/is-symbol/README.md)\n- [isUndefined](src/core/is-undefined/README.md)\n- [memoize](src/core/memoize/README.md)\n- [parseUrl](src/core/parse-url/README.md)\n- [retry](src/core/retry/README.md)\n- [scheduler](src/core/scheduler/README.md)\n- [sleep](src/core/sleep/README.md)\n- [throttle](src/core/throttle/README.md)\n- [toType](src/core/to-type/README.md)\n\n### Date\n\n- [age](src/date/age/README.md)\n- [dateCalculator](src/date/date-calculator/README.md)\n- [daysBetweenDates](src/date/days-between-dates/README.md)\n- [formatDate](src/date/format-date/README.md)\n- [isLeapYear](src/date/is-leap-year/README.md)\n- [isWeekend](src/date/is-weekend/README.md)\n\n### Math\n\n- [nCr](src/math/arrangements/README.md)\n- [nPr](src/math/arrangements/README.md)\n- [binomial](src/math/binomial/README.md)\n- [clamp](src/math/clamp/README.md)\n- [factorial](src/math/factorial/README.md)\n- [gcd](src/math/gcd/README.md)\n- [hypergeometric](src/math/hypergeometric/README.md)\n- [iqr](src/math/iqr/README.md)\n- [lcm](src/math/lcm/README.md)\n- [lerp](src/math/lerp/README.md)\n- [mean](src/math/mean/README.md)\n- [median](src/math/median/README.md)\n- [mode](src/math/mode/README.md)\n- [poisson](src/math/poisson/README.md)\n- [q1](src/math/quartile/README.md)\n- [q2](src/math/quartile/README.md)\n- [q3](src/math/quartile/README.md)\n- [q4](src/math/quartile/README.md)\n- [randomInt](src/math/random-int/README.md)\n- [rotateMatrix](src/math/rotate-matrix/README.md)\n- [std](src/math/std/README.md)\n- [sum](src/math/sum/README.md)\n- [variance](src/math/variance/README.md)\n\n### String\n\n- [capitalize](src/string/capitalize/README.md)\n- [convertCase](src/string/convert-case/README.md)\n- [isUUID](src/string/is-uuid/README.md)\n- [numberToRoman](src/string/number-to-roman/README.md)\n- [replaceAll](src/string/replace-all/README.md)\n- [reverse](src/string/reverse/README.md)\n- [truncate](src/string/truncate/README.md)\n\n### System\n\n- [measurePerformance](src/system/measure-performance/README.md)\n\n## Contributing\n\nContributions are welcome! For major changes, please open an issue first to discuss what you would like to change. Ensure to update tests as appropriate.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomfanhm%2Fnewtype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomfanhm%2Fnewtype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomfanhm%2Fnewtype/lists"}