MCPcopy
hub / github.com/wavetermdev/waveterm / isIconValid

Function isIconValid

frontend/app/view/preview/preview-directory-utils.tsx:61–66  ·  view source on GitHub ↗
(icon: string)

Source from the content-addressed store, hash-verified

59const iconRegex = /^[a-z0-9- ]+$/;
60
61export function isIconValid(icon: string): boolean {
62 if (isBlank(icon)) {
63 return false;
64 }
65 return icon.match(iconRegex) != null;
66}
67
68export function getSortIcon(sortType: string | boolean): React.ReactNode {
69 switch (sortType) {

Callers 1

DirectoryTableFunction · 0.90

Calls 1

isBlankFunction · 0.90

Tested by

no test coverage detected