Last active
April 10, 2016 18:29
-
-
Save rubeniskov/0ddfa4f1b01176d418dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Rubén López Gómez | |
Gist: https://gist.github.com/rubeniskov/0ddfa4f1b01176d418dd | |
*/ | |
var sufix = function() { | |
return Array.prototype.slice.call(arguments).map(function(v, i, parts) { | |
return parts[i + 1] ? | |
v.replace(new RegExp(parts[i + 1] + '$', 'i'), '') : | |
[v.charAt(0).toUpperCase(), v.slice(1)].join(''); | |
}).join('') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment