Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Añadida la sugerencia de @Genezeta
  • Loading branch information
Serabe committed Sep 8, 2011
1 parent 59ec10c commit d86f0cc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 06/h.js
@@ -1,22 +1,22 @@
HelperJS = HJS = (function() {

ltrim = function(string) {
var ltrim = function(string) {
return string.replace(/^\s*/,"")
};

rtrim = function(string) {
var rtrim = function(string) {
return string.replace(/\s*$/,"")
};

trim = function(string) {
var trim = function(string) {
return ltrim(rtrim(string));
};

toUrl = function(string) {
var toUrl = function(string) {
return trim(string).replace(/\s*/g, "-");
};

camelCase = function(string) {
var camelCase = function(string) {
i=j=0;
string = trim(string);
newStr = "";
Expand All @@ -39,7 +39,7 @@ HelperJS = HJS = (function() {
return newStr;
};

passEncrypt = function(string) {
var passEncrypt = function(string) {
return string.replace(/l/gi, "1").replace(/e/gi, "3").replace(/s/gi, "5").
replace(/b/gi, "8").replace(/g/gi, "9").replace(/o/gi, "0").
replace(/a/gi, "4").replace(/r/gi, "2").replace(/t/gi, "7");
Expand Down

0 comments on commit d86f0cc

Please sign in to comment.