Code coverage report for master/swapCase.js

Statements: 100% (4 / 4)      Branches: 100% (2 / 2)      Functions: 100% (2 / 2)      Lines: 100% (4 / 4)      Ignored: none     

All files » master/ » swapCase.js
1 2 3 4 5 6 7 81   1 5 20      
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();
  });
};