typescriptUpdated about 2 months ago

Render string detail with dash

by @Apiwit

typescript
export const renderDetail = (data?: unknown): string => {
  if (!data || typeof data !== "string") return "-";

  return data;
};

Description

Render string value. Will display dash sign instead if value is not present.

Comments