{"id":23872989,"url":"https://github.com/immortalwebdev/text-trans-npm-lib","last_synced_at":"2026-04-15T19:39:08.281Z","repository":{"id":270464027,"uuid":"909688196","full_name":"immortalWebDev/text-trans-NPM-lib","owner":"immortalWebDev","description":"A mini comprehensive library for performing various string manipulations. This library provides utility functions that simplify and enhance string operations for JavaScript projects.","archived":false,"fork":false,"pushed_at":"2024-12-31T10:43:28.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T11:30:59.737Z","etag":null,"topics":["javascript","npm","npm-library","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/immortalWebDev.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-29T13:46:06.000Z","updated_at":"2024-12-31T10:48:33.000Z","dependencies_parsed_at":"2024-12-31T11:31:31.487Z","dependency_job_id":"e1993ff6-e225-4a22-bf63-1a0e79dc1502","html_url":"https://github.com/immortalWebDev/text-trans-NPM-lib","commit_stats":null,"previous_names":["immortalwebdev/text-trans-npm-lib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immortalWebDev%2Ftext-trans-NPM-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immortalWebDev%2Ftext-trans-NPM-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immortalWebDev%2Ftext-trans-NPM-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/immortalWebDev%2Ftext-trans-NPM-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/immortalWebDev","download_url":"https://codeload.github.com/immortalWebDev/text-trans-NPM-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240229976,"owners_count":19768597,"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","npm","npm-library","typescript"],"created_at":"2025-01-03T16:37:22.728Z","updated_at":"2026-04-15T19:39:03.255Z","avatar_url":"https://github.com/immortalWebDev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# String Utilities Library\n\nA comprehensive library for performing various string manipulations. This library provides utility functions that simplify and enhance string operations for JavaScript projects.\n\n## Installation\n\nTo use this library, first install it:\n\n```javascript\nnpm install 'text-trans';\n```\n\nAdd the file containing the exported functions to your project and import the desired utilities.\n\n```javascript\nimport { capitalize, reverse, truncate, ... } from 'text-trans';\n```\n\n---\n\n## Functions Overview\n\n### 1. **capitalize**\n- **Description**: Capitalizes the first letter of a string.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: A new string with the first letter capitalized.\n- **Example**:\n  ```javascript\n  capitalize(\"hello world\"); // Output: \"Hello world\"\n  ```\n\n### 2. **reverse**\n- **Description**: Reverses the given string.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The reversed string.\n- **Example**:\n  ```javascript\n  reverse(\"hello\"); // Output: \"olleh\"\n  ```\n\n### 3. **truncate**\n- **Description**: Truncates a string to the specified length and appends an ellipsis (`...`) if necessary.\n- **Arguments**:\n  - `str` (string): The input string.\n  - `length` (number): The maximum length of the string.\n- **Returns**: The truncated string with an ellipsis if it exceeds the length.\n- **Example**:\n  ```javascript\n  truncate(\"This is a long string\", 10); // Output: \"This is a...\"\n  ```\n\n### 4. **toCamelCase**\n- **Description**: Converts a string to camelCase.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The camelCase formatted string.\n- **Example**:\n  ```javascript\n  toCamelCase(\"hello world example\"); // Output: \"helloWorldExample\"\n  ```\n\n### 5. **toPascalCase**\n- **Description**: Converts a string to PascalCase.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The PascalCase formatted string.\n- **Example**:\n  ```javascript\n  toPascalCase(\"hello world example\"); // Output: \"HelloWorldExample\"\n  ```\n\n### 6. **toKebabCase**\n- **Description**: Converts a string to kebab-case.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The kebab-case formatted string.\n- **Example**:\n  ```javascript\n  toKebabCase(\"Hello World Example\"); // Output: \"hello-world-example\"\n  ```\n\n### 7. **toSnakeCase**\n- **Description**: Converts a string to snake_case.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The snake_case formatted string.\n- **Example**:\n  ```javascript\n  toSnakeCase(\"Hello World Example\"); // Output: \"hello_world_example\"\n  ```\n\n### 8. **toTitleCase**\n- **Description**: Converts a string to Title Case.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The Title Case formatted string.\n- **Example**:\n  ```javascript\n  toTitleCase(\"hello world example\"); // Output: \"Hello World Example\"\n  ```\n\n### 9. **wordCount**\n- **Description**: Counts the number of words in a string.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: The word count as a number.\n- **Example**:\n  ```javascript\n  wordCount(\"This is a sample sentence.\"); // Output: 5\n  ```\n\n### 10. **isPalindrome**\n- **Description**: Checks if a string is a palindrome.\n- **Arguments**:\n  - `str` (string): The input string.\n- **Returns**: A boolean value indicating whether the string is a palindrome.\n- **Example**:\n  ```javascript\n  isPalindrome(\"A man, a plan, a canal: Panama\"); // Output: true\n  isPalindrome(\"hello\"); // Output: false\n  ```\n\n---\n\n## 📜 License\nThis library is open-source and can be used freely in personal and commercial projects.\n\n\n## 📧 Contact\n\nFor any inquiries, feedback, or support:\n- **Phone:** [WhatsApp](https://wa.me/917774835449)\n- **Email**: [pgbadgujar007@gmail.com](mailto:pgbadgujar007@gmail.com)\n- **Portfolio**: [My Portfolio](https://www.snapit.tech/pgbadgujar007/5w3jtzcp1e)\n\n--- \n\n **Inspired by NPM** \u0026\u0026\n ***Created with 💝 by Piyush***","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmortalwebdev%2Ftext-trans-npm-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimmortalwebdev%2Ftext-trans-npm-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimmortalwebdev%2Ftext-trans-npm-lib/lists"}