/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/iconMatchesSearchQuery.ts
/**
* True when `needle` matches the icon export `name` and/or any string returned
* by `getTags(name)` (e.g. Figma-derived tags), using a case-insensitive regex
* with special characters escaped.
*/
function iconMatchesSearchQuery(name, needle, getTags) {
	const escapedNeedle = needle.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
	const re = new RegExp(escapedNeedle, "i");
	if (re.test(name.toLowerCase())) return true;
	return getTags(name).some((tag) => re.test(tag));
}
//#endregion
exports.iconMatchesSearchQuery = iconMatchesSearchQuery;
