UNPKG

webforai

Version:

A library that provides a web interface for AI

20 lines (19 loc) 479 B
// src/extractors/presets/utils.ts var matchString = (element) => `${element.tagName} ${element.properties.id} ${classnames(element).join(" ")}`; var classnames = (element) => { if (Array.isArray(element.properties.className)) { return element.properties.className; } return []; }; var isStrInclude = (value, match) => { if (typeof value === "string") { return value.includes(match); } return false; }; export { classnames, isStrInclude, matchString };