{"id":27398987,"url":"https://github.com/tyecoder/strman","last_synced_at":"2025-04-14T02:51:14.731Z","repository":{"id":272190417,"uuid":"915648077","full_name":"tyecoder/strman","owner":"tyecoder","description":"A lightweight library for string formatting and transformation.","archived":false,"fork":false,"pushed_at":"2025-01-13T08:47:19.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T15:36:34.667Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tyecoder.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":"2025-01-12T12:42:41.000Z","updated_at":"2025-01-13T08:47:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"315bc853-b22b-44a1-996d-dbe772c7ae7c","html_url":"https://github.com/tyecoder/strman","commit_stats":null,"previous_names":["tyecode/strman","tyecoder/strman"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyecoder%2Fstrman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyecoder%2Fstrman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyecoder%2Fstrman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyecoder%2Fstrman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyecoder","download_url":"https://codeload.github.com/tyecoder/strman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813824,"owners_count":21165631,"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":[],"created_at":"2025-04-14T02:51:14.218Z","updated_at":"2025-04-14T02:51:14.723Z","avatar_url":"https://github.com/tyecoder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# @tyecode/strman\n\nA lightweight library for string formatting and transformation, built in TypeScript. It provides various utilities for manipulating string cases, formatting strings, and more.\n\n## Features\n\n- Convert strings between camelCase, PascalCase, snake_case, kebab-case, and other formats.\n- Slugify strings for URL-friendly output.\n- Template string replacement for dynamic content.\n- Easily extensible with more string transformation methods.\n\n## Installation\n\nYou can install `@tyecode/strman` via `npm`, `yarn` or `pnpm`:\n\n```bash\n# Using npm\nnpm install @tyecode/strman\n\n# Using yarn\nyarn add @tyecode/strman\n\n# Using pnpm\npnpm add @tyecode/strman\n```\n\n## Usage\n\nImport the functions you need from the package:\n\n```typescript\nimport { toCamelCase, toPascalCase, toSnakeCase, toKebabCase, capitalize, slugify, templateReplace } from '@tyecode/strman';\n\nconsole.log(toCamelCase('hello_world'));  // helloWorld\nconsole.log(toPascalCase('hello_world')); // HelloWorld\nconsole.log(toSnakeCase('HelloWorld'));   // hello_world\nconsole.log(toKebabCase('HelloWorld'));   // hello-world\nconsole.log(capitalize('hello'));         // Hello\nconsole.log(slugify('Hello World!'));    // hello-world\nconsole.log(templateReplace('Hello {name}!', { name: 'Tye' })); // Hello Tye!\n```\n\n## API\n\n### `toCamelCase(str: string): string`\nConverts a string to camelCase.\n\n### `toPascalCase(str: string): string`\nConverts a string to PascalCase.\n\n### `toSnakeCase(str: string): string`\nConverts a string to snake_case.\n\n### `toKebabCase(str: string): string`\nConverts a string to kebab-case.\n\n### `capitalize(str: string): string`\nCapitalizes the first letter of the string.\n\n### `slugify(str: string): string`\nConverts a string to a slug format (lowercase and hyphen-separated).\n\n### `templateReplace(template: string, values: object): string`\nReplaces placeholders in the template string with values from the provided object.\n\n## Development\n\n### Setup\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/tyecode/strman.git\n    cd strman\n    ```\n\n2. Install dependencies:\n    ```bash\n    pnpm install\n    ```\n\n3. Build the project:\n    ```bash\n    pnpm run build\n    ```\n\n4. Run tests:\n    ```bash\n    pnpm run test\n    ```\n\n### Linting\n\nTo lint the project:\n\n```bash\npnpm run lint\n```\n\n## Contributing\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-name`).\n3. Make your changes.\n4. Commit your changes (`git commit -am 'Add feature'`).\n5. Push to the branch (`git push origin feature-name`).\n6. Create a new Pull Request.\n\n## License\n\nMIT License. See [LICENSE](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyecoder%2Fstrman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyecoder%2Fstrman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyecoder%2Fstrman/lists"}