MCPcopy Index your code
hub / github.com/nodejs/node / encode

Function encode

lib/internal/mime.js:118–124  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

116}
117
118const encode = (value) => {
119 if (value.length === 0) return '""';
120 const encode = SafeStringPrototypeSearch(value, NOT_HTTP_TOKEN_CODE_POINT) !== -1;
121 if (!encode) return value;
122 const escaped = escapeQuoteOrSolidus(value);
123 return `"${escaped}"`;
124};
125
126class MIMEParams {
127 #data = new SafeMap();

Callers 1

toStringMethod · 0.70

Calls 1

escapeQuoteOrSolidusFunction · 0.85

Tested by

no test coverage detected