A TypeScript library for normalizing and parameterizing strings, making them URL-friendly.
Install parameterize
using npm:
npm install @goudekettingrm/parameterize
or using yarn:
yarn add @goudekettingrm/parameterize
Import and use the parameterize function in your TypeScript or JavaScript project:
import { parameterize } from '@goudekettingrm/parameterize';
const normalizedString = parameterize('Äpfel & Birnen!');
console.log(normalizedString); // Outputs: 'apfel-birnen'
- parameterize(str: string, options?: { charCap?: number, separator?: string }): string
- str: The string to be normalized and parameterized.
- options: Optional settings.
- charCap: Maximum length of the output string.
- separator: The separator to use instead of hyphens.
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct, and the process for submitting pull requests.
This project is licensed under the MIT License.