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

Function swapCase

test/fixtures/snapshot/typescript.js:7195–7200  ·  view source on GitHub ↗

Convert all lowercase chars to uppercase, and vice-versa

(s)

Source from the content-addressed store, hash-verified

7193 }
7194 /** Convert all lowercase chars to uppercase, and vice-versa */
7195 function swapCase(s) {
7196 return s.replace(/\w/g, function (ch) {
7197 var up = ch.toUpperCase();
7198 return ch === up ? ch.toLowerCase() : up;
7199 });
7200 }
7201 function fsWatchFileWorker(fileName, callback, pollingInterval) {
7202 _fs.watchFile(fileName, { persistent: true, interval: pollingInterval }, fileChanged);
7203 var eventKind;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected