MCPcopy Create free account
hub / github.com/mdevils/html-entities / createHtml4EncodeMethods

Function createHtml4EncodeMethods

benchmark/benchmark.ts:70–80  ·  view source on GitHub ↗
(textToEncode: string)

Source from the content-addressed store, hash-verified

68}
69
70function createHtml4EncodeMethods(textToEncode: string) {
71 const nonAsciiPrintable: EncodeOptions = {level: 'html4', mode: 'nonAsciiPrintable'};
72 const extensive: EncodeOptions = {level: 'html4', mode: 'extensive'};
73 const nonAscii: EncodeOptions = {level: 'html4', mode: 'nonAscii'};
74 return {
75 'html-entities.encode - html4, nonAscii': () => encode(textToEncode, nonAscii),
76 'html-entities.encode - html4, nonAsciiPrintable': () => encode(textToEncode, nonAsciiPrintable),
77 'html-entities.encode - html4, extensive': () => encode(textToEncode, extensive),
78 '(old) Html4Entities.encodeNonASCII': () => html4Entities.encodeNonASCII(textToEncode)
79 };
80}
81
82function createHtml4DecodeMethods(textToDecode: string) {
83 const strict: DecodeOptions = {level: 'html4', scope: 'strict'};

Callers 1

benchmark.tsFile · 0.85

Calls 2

encodeFunction · 0.90
encodeNonASCIIMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…