{"id":15011211,"url":"https://github.com/cerebrusinc/fstring","last_synced_at":"2026-03-16T12:06:26.932Z","repository":{"id":61120907,"uuid":"548471283","full_name":"cerebrusinc/fstring","owner":"cerebrusinc","description":"This brings Python string manipulation to js!","archived":false,"fork":false,"pushed_at":"2023-10-16T13:56:51.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T19:03:02.580Z","etag":null,"topics":["javascript","nodejs","package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cerebrusinc/fstring","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cerebrusinc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-10-09T16:33:22.000Z","updated_at":"2023-10-27T02:39:43.000Z","dependencies_parsed_at":"2023-07-24T09:49:35.476Z","dependency_job_id":null,"html_url":"https://github.com/cerebrusinc/fstring","commit_stats":null,"previous_names":["lewisjr/fstring"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebrusinc%2Ffstring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebrusinc%2Ffstring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebrusinc%2Ffstring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cerebrusinc%2Ffstring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cerebrusinc","download_url":"https://codeload.github.com/cerebrusinc/fstring/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243307333,"owners_count":20270256,"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":["javascript","nodejs","package","typescript"],"created_at":"2024-09-24T19:39:43.208Z","updated_at":"2025-12-25T13:27:49.999Z","avatar_url":"https://github.com/cerebrusinc.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://drive.google.com/uc?id=1DZEqZQlyfzhFxHS3LI82k_saQkOBerf8\" alt=\"py-qol logo\" width=\"250\" height=\"250\" /\u003e\n\u003c/p\u003e\n\n# fstring\n\nThis package brings some Python string formatting to Javascript! Currently you can:\n\n- Abbreviate a string\n- Make a string sentence case\n- Make a string title case\n\n# Installation\n\n    npm install @techtronics/fstring\n\nor\n\n    yarn add @techtronics/fstring\n\nIt goes hand in hand with our quality of life package [qol](https://github.com/lewisjr/qol)\n\n# Importing\n\n```javascript\n// ES6 Module\nimport * as fstring from \"@techtronics/fstring\";\n\n// ES6 Destructuring\nimport { abbreviate, toTitleCase, toSentenceCase } from \"@techtronics/fstring\";\n\n// ES5 Module\nconst fstring = require(\"@techtronics/fstring\");\n\n// ES5 Destructuring\nconst {\n\tabbreviate,\n\ttoTitleCase,\n\ttoSentenceCase,\n} = require(\"@techtronics/fstring\");\n```\n\n# Usage\n\n```javascript\nconst sentence = \"heLLo wOrLD, mY NAME is lEwis; i am a Developer.\";\nconst name = \"lEwiS mOsho junior\";\n\nconsole.log(toSentenceCase(sentence));\n// Hello world, my name is lewis; I am a developer.\n\nconsole.log(toTitleCase(name));\n// Lewis Mosho Junior\n\nconsole.log(abbreviate(name));\n// LMJ\n```\n\n# Functions\n\n## abbreviate\n\nMake an **abbreviation** of a string; Usually used for names. It returns a capital case abbreviation of the string.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eParams\u003c/strong\u003e\u003c/summary\u003e\n\n| Parameter | Default Setting | Required? | Definition                                                  |\n| --------- | --------------- | --------- | ----------------------------------------------------------- |\n| txt       | `null`          | Yes       | The string you wish to abbreviate                           |\n| delimiter | `\" \"`           | No        | The character or string that seperates words in the string  |\n| reverse   | `false`         | No        | An option to enable you to request a reversed return string |\n\n\u003c/details\u003e\n\n## toTitleCase\n\nMake any string **title cased**. it returns a string in which every first letter of a word is upper cased with the rest being lower cased.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eParams\u003c/strong\u003e\u003c/summary\u003e\n\n| Parameter | Default Setting | Required? | Definition                                                 |\n| --------- | --------------- | --------- | ---------------------------------------------------------- |\n| txt       | `null`          | Yes       | The string you wish to change to title case                |\n| delimiter | `\" \"`           | No        | The character or string that seperates words in the string |\n\n\u003c/details\u003e\n\n## toSentenceCase\n\nMake any string **sentence cased**; The current sentence delimiters are:\n\n- `.`\n- `;`\n- `:`\n- `!`\n- `?`\n\nIt returns a string in which every first letter of the first word of a sentence is capitalised, with the reaminder of the senter being lower cased.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eParams\u003c/strong\u003e\u003c/summary\u003e\n\n| Parameter | Default Setting | Required? | Definition                                                 |\n| --------- | --------------- | --------- | ---------------------------------------------------------- |\n| txt       | `null`          | Yes       | The string you wish to change to sentence case             |\n| delimiter | `\" \"`           | No        | The character or string that seperates words in the string |\n\n\u003c/details\u003e\n\n# Changelog\n\n## v0.1.x\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cstrong\u003ev0.1.5\u003c/strong\u003e\u003c/summary\u003e\n\n- Moved from [@techtronics/fstring](https://www.npmjs.com/package/@techtronics/fstring)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ev0.1.4\u003c/strong\u003e\u003c/summary\u003e\n\n- Added colon support to `toSentenceCase`\n- Full parity with our python quality of life [qolpy](https://github.com/lewisjr/qolpy) package\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ev0.1.3\u003c/strong\u003e\u003c/summary\u003e\n\n- Fixed missing build and type annotations\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ev0.1.2\u003c/strong\u003e\u003c/summary\u003e\n\n- Added the option to have the abbreviation reverse or not before return\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ev0.1.1\u003c/strong\u003e\u003c/summary\u003e\n\n- Type hint updates\n- README restructuring\n- toSentenceCase now supports custom delimiters 😎\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003ev0.1.0\u003c/strong\u003e\u003c/summary\u003e\n\n- Initial release\n- Sentence casing, title casing, and abrreviations added and typed\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerebrusinc%2Ffstring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcerebrusinc%2Ffstring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcerebrusinc%2Ffstring/lists"}