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

Function toASCIILower

lib/internal/mime.js:25–37  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

23const START_ENDING_WHITESPACE = /[\r\n\t ]*$/;
24
25function toASCIILower(str) {
26 // eslint-disable-next-line no-control-regex
27 if (!/[^\x00-\x7f]/.test(str)) return StringPrototypeToLowerCase(str);
28 let result = '';
29 for (let i = 0; i < str.length; i++) {
30 const char = str[i];
31
32 result += char >= 'A' && char <= 'Z' ?
33 StringPrototypeToLowerCase(char) :
34 char;
35 }
36 return result;
37}
38
39const SOLIDUS = '/';
40const SEMICOLON = ';';

Callers 4

parseTypeAndSubtypeFunction · 0.85
#parseMethod · 0.85
typeMethod · 0.85
subtypeMethod · 0.85

Calls 1

testMethod · 0.45

Tested by

no test coverage detected