import { escapeRegExp } from "./escapeRegExp.js";
//#region src/hooks/useNumberInput/utils/removeInvalidChars.ts
/**
* Remove invalid characters
*/
const removeInvalidChars = (value, validChars) => {
	const chars = escapeRegExp(validChars.join(""));
	const reg = new RegExp(`[^\\d${chars}]`, "gi");
	return value.replace(reg, "");
};
//#endregion
export { removeInvalidChars };
