uhyphen is a compact, single-purpose JavaScript utility designed specifically for transforming camelCase strings into kebab-case (hyphenated strings). Currently at version 0.2.0, the package prioritizes a small footprint and focused functionality over extensive features. Its release cadence is infrequent, as the project appears to be stable and feature-complete for its intended use case, with the last code changes occurring several years ago. Key differentiators include its 'micro' nature, making it ideal for environments where bundle size and minimal dependencies are crucial. It provides a straightforward API for a common string manipulation task without incorporating complex linguistic hyphenation rules or broader string utility features.
npm install uhyphenVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the 'uhyphen' function to convert various camelCase strings into their corresponding kebab-case (hyphenated) forms.
Create a 'uhyphen.d.ts' file in your project's root or a types directory with `declare module 'uhyphen';` to resolve basic import errors. For specific type signatures, define them manually.
It is recommended to pin to exact versions in your 'package.json' (e.g., `"uhyphen": "0.2.0"`) and thoroughly test any updates before deploying to production environments, especially when dealing with pre-1.0 versions.
Ensure input strings strictly adhere to a camelCase convention. For more diverse string transformations or complex hyphenation logic (like natural language hyphenation), consider using a more comprehensive string utility library.
Change your import statement from `import { uhyphen } from 'uhyphen'` to `import uhyphen from 'uhyphen'` to correctly import the default export.Create a file named `uhyphen.d.ts` in your project (e.g., in a `src/types` or `types` directory) and add the content `declare module 'uhyphen';` to provide a minimal type declaration, or a more detailed one if specific function signatures are needed.
No dependency data recorded yet.