@eds/utils
v4.0.4
Utils
Collection of utility functions.Accepts a string and returns the string with the first letter capitalised.
const word = capitaliseFirstLetter('items');console.info(word); // Items
Turns a camel cased string into a slugified string.
const slugified = slugify('SelectDropdown');console.info(slugified); // select-dropdown
The useDebounce hook can be used to debounce a value in a React component.
By sending a local state value to the useDebounce hook, the hook will only return the updated value after the value hasn't changed for a specified time, 500ms by default.