UNPKG

react-link-textarea

Version:

Enhancing UX by breaking the limitations of original textarea tag, supports link integration and offers flexible styling options.

11 lines (9 loc) 307 B
export const snakeToCamel = (string: string) => string .split('-') .map((word, index) => index === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1), ) .join(''); export const parsePxToNumber = (value: string) => value.endsWith('px') ? parseInt(value.slice(0, -2), 10) : 0;