projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Version 1
[yaffs-website]
/
node_modules
/
underscore.string
/
swapCase.js
diff --git a/node_modules/underscore.string/swapCase.js
b/node_modules/underscore.string/swapCase.js
new file mode 100644
(file)
index 0000000..
0857262
--- /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();
+ });
+};