8 lines
225 B
JavaScript
8 lines
225 B
JavaScript
![]() |
var makeString = require('./helper/makeString');
|
||
|
|
||
|
module.exports = function swapCase(str) {
|
||
|
return makeString(str).replace(/\S/g, function(c) {
|
||
|
return c === c.toUpperCase() ? c.toLowerCase() : c.toUpperCase();
|
||
|
});
|
||
|
};
|