X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Funderscore.string%2FswapCase.js;fp=node_modules%2Funderscore.string%2FswapCase.js;h=08572629457d9cfab9025ae75ae6c8e2a64e9911;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/underscore.string/swapCase.js b/node_modules/underscore.string/swapCase.js new file mode 100644 index 000000000..085726294 --- /dev/null +++ b/node_modules/underscore.string/swapCase.js @@ -0,0 +1,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(); + }); +};