UNPKG

@kelvininc/ui-components

Version:
27 lines (23 loc) 795 B
import { i as isEmpty } from './p-BZNGlO8m.js'; const isValidLabel = (label) => { return !isEmpty(label === null || label === void 0 ? void 0 : label.trim()); }; const getUTF8StringLength = (label) => { return label ? [...label].length : 0; }; const isSubString = (term, string, caseSensitive = false) => { if (term.length === 0) { return true; } if (caseSensitive) { return string.includes(term); } return string.toLocaleLowerCase().includes(term.toLocaleLowerCase()); }; var string_helper = /*#__PURE__*/Object.freeze({ __proto__: null, getUTF8StringLength: getUTF8StringLength, isSubString: isSubString, isValidLabel: isValidLabel }); export { isValidLabel as a, getUTF8StringLength as g, isSubString as i, string_helper as s };