{"id":16400632,"url":"https://github.com/dilan-dio4/strz","last_synced_at":"2025-03-16T16:31:42.878Z","repository":{"id":152905480,"uuid":"627532967","full_name":"dilan-dio4/strz","owner":"dilan-dio4","description":"💪 Very strongly typed string functions in TypeScript","archived":false,"fork":false,"pushed_at":"2023-04-13T17:43:05.000Z","size":37,"stargazers_count":119,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T11:40:40.315Z","etag":null,"topics":["nodejs","ts","typescript"],"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/dilan-dio4.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}},"created_at":"2023-04-13T17:00:37.000Z","updated_at":"2024-12-01T22:00:14.000Z","dependencies_parsed_at":"2023-07-06T14:16:30.134Z","dependency_job_id":null,"html_url":"https://github.com/dilan-dio4/strz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilan-dio4%2Fstrz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilan-dio4%2Fstrz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilan-dio4%2Fstrz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dilan-dio4%2Fstrz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dilan-dio4","download_url":"https://codeload.github.com/dilan-dio4/strz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822293,"owners_count":20353499,"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","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":["nodejs","ts","typescript"],"created_at":"2024-10-11T05:28:12.963Z","updated_at":"2025-03-16T16:31:42.829Z","avatar_url":"https://github.com/dilan-dio4.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# `strz` – _Very_ Strongly Typed String Functions\n\n- 0️⃣ No dependencies\n- 🌲 Tree shakable\n- 📦 Small\n- 5️⃣ Typescript 5\n- 📝 Strongly typed\n\n### Why?\n\nIn projects that encourage strong typing, the standard library requires manually casting to match function parameter signatures. `strz` brings the power of strong typing to the standard library.\n\n### Example\n\n```ts\nimport { split, suffix } from 'strz'\n\nconst str = \"The quick brown fox jumps over the lazy dog\"\n\nconst splitStr = split(str, \" \") // splitStr is of type [\"The\", \"quick\", \"brown\", \"fox\", \"jumps\", \"over\", \"the\", \"lazy\", \"dog\"]\nconst suffixed = suffix(str, \"!\") // suffixed is of type \"The quick brown fox jumps over the lazy dog!\"\n```\n\n### Installation\n\n```bash\nnpm install strz\n```\n\n### Usage\n\n```ts\nimport {\n  charAt,\n  toLowerCase,\n  toUpperCase,\n  toArray,\n  slice,\n  uncapitalize,\n  capitalize,\n  prefix,\n  suffix,\n  split,\n  trim,\n  trimStart,\n  trimEnd,\n  replaceAll,\n  replace,\n  length,\n} from 'strz'\n\nconst str = \"The quick brown fox jumps over the lazy dog\"\n\n// Before\nconst char = str.charAt(0) // char is of type string\n// After\nconst char = charAt(str, 0) // char is of type \"T\"\n\n// Before\nconst replaced = str.replaceAll(\" \", \"_\" ) // replaced is of type string\n// After\nconst replaced = replaceAll(str, \" \", \"_\" ) // replaced is of type \"The_quick_brown_fox_jumps_over_the_lazy_dog\"\n\n// And so on...\n```\n\n### API\n\n- `charAt` ✅\n- `toLowerCase` ✅\n- `toUpperCase` ✅\n- `toArray` ✅\n- `slice` ✅\n  - This is a partial implementation of `slice` and does not support negative indices\n- `uncapitalize` ✅\n- `capitalize` ✅\n- `prefix` ✅\n- `suffix` ✅\n- `split` ✅\n- `trim` ✅\n- `trimStart` ✅\n- `trimEnd` ✅\n- `replaceAll` ✅\n  - This is a partial implementation of `replaceAll` and does not support regex\n- `replace` ✅\n  - This is a partial implementation of `replace` and does not support regex\n- `length` ✅\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilan-dio4%2Fstrz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdilan-dio4%2Fstrz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdilan-dio4%2Fstrz/lists"}