Blame view

node_modules/underscore.string/swapCase.js 225 Bytes
f7563de62   Palak Handa   first commit
1
2
3
4
5
6
7
  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();
    });
  };