MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / decodeHTML

Function decodeHTML

packages/utilities/src/string.ts:3–12  ·  view source on GitHub ↗
(text?: string)

Source from the content-addressed store, hash-verified

1import { decodeHTML as decode } from 'entities';
2
3export function decodeHTML(text?: string): string {
4 if (!text) {
5 return '';
6 }
7 try {
8 return decode(text);
9 } catch (exception) {
10 return '';
11 }
12}
13
14export function truncate(text: string, limit: number): string {
15 if (text.length > limit) {

Callers 4

string.spec.tsFile · 0.90
TextFunction · 0.90
BlockCodeFunction · 0.90
InlineCodeFunction · 0.90

Calls 1

decodeFunction · 0.85

Tested by

no test coverage detected