@web3r/flowerkit
Version:
A collection of more than 60 often used utility JS functions that simplify frontend development.
13 lines • 445 B
TypeScript
/**
* Checks if string is valid CSS selector
* @param str{String} - source selector
* @return {boolean}
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors
* @example
* // How to check if CSS selector is valid?
* const selector = "#myElement";
* const isValid = isSelectorValid(selector);
* console.log(isValid); // => true
*/
export function isSelectorValid(str: string): boolean;
//# sourceMappingURL=index.d.ts.map