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

Function createHtml4DecodeMethods

benchmark/benchmark.ts:82–92  ·  view source on GitHub ↗
(textToDecode: string)

Source from the content-addressed store, hash-verified

80}
81
82function createHtml4DecodeMethods(textToDecode: string) {
83 const strict: DecodeOptions = {level: 'html4', scope: 'strict'};
84 const body: DecodeOptions = {level: 'html4', scope: 'body'};
85 const attribute: DecodeOptions = {level: 'html4', scope: 'attribute'};
86 return {
87 'html-entities.decode - html4, strict': () => decode(textToDecode, strict),
88 'html-entities.decode - html4, body': () => decode(textToDecode, body),
89 'html-entities.decode - html4, attribute': () => decode(textToDecode, attribute),
90 '(old) Html4Entities.decode': () => html4Entities.decode(textToDecode)
91 };
92}
93
94function createXmlEncodeMethods(textToEncode: string) {
95 const nonAsciiPrintable: EncodeOptions = {level: 'xml', mode: 'nonAsciiPrintable'};

Callers 1

benchmark.tsFile · 0.85

Calls 2

decodeFunction · 0.90
decodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…