Comparing version 1.0.1 to 1.0.2
36
leet.js
@@ -18,6 +18,6 @@ #!/usr/bin/env node | ||
if (w) { | ||
if (w) { | ||
app.output(w); | ||
} else { | ||
app.error(); | ||
app.error(); | ||
} | ||
@@ -70,2 +70,8 @@ } else { | ||
render: function (s) { | ||
var x = /cks/g; | ||
if (x.test(s)) { | ||
s = s.replace(x, 'x'); | ||
} | ||
var b = s.split(''), | ||
@@ -79,2 +85,4 @@ a = []; | ||
a.push(app.get(c)); | ||
} else { | ||
a.push(c); | ||
} | ||
@@ -87,10 +95,13 @@ } | ||
/** | ||
* Test if character is a vowel | ||
* Test character | ||
*/ | ||
test: function (c) { | ||
var v = ['4', 'I', '3', '0', 'U'], | ||
var v = /^[4I30U]$/i, | ||
s = /^[!?.,-]$/i, | ||
b = false; | ||
if (v.indexOf(c) >= 0) { | ||
b = true; | ||
if (v.test(c)) { | ||
b = 'vowel'; | ||
} else if (s.test(c)) { | ||
b = 'special'; | ||
} | ||
@@ -106,8 +117,13 @@ | ||
var l = s[s.length - 1], | ||
v = app.test(l); | ||
t = app.test(l), | ||
f = s.join(''); | ||
if (v) { | ||
console.log(s.join('') + 'ZORZ'); | ||
if (t) { | ||
if (t == 'special') { | ||
console.log(f.substr(0, f.length - 1) + 'ZORZ' + l); | ||
} else if (t == 'vowel') { | ||
console.log(f + 'XOR'); | ||
} | ||
} else { | ||
console.log(s.join('') + 'ORZ'); | ||
console.log(f + 'ZORZ'); | ||
} | ||
@@ -114,0 +130,0 @@ }, |
{ | ||
"name": "leet", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Convert boring text to 1337 text", | ||
@@ -5,0 +5,0 @@ "main": "leet.js", |
@@ -18,2 +18,4 @@ #leet.js | ||
That's it! [Dance!](http://www.youtube.com/watch?v=8grzRgQ_AWY) | ||
*** | ||
@@ -27,4 +29,8 @@ ###Usage | ||
I W4N7 70 B3 1337ORZ | ||
I W4N7 70 B3 1337ZORZ | ||
**Note:** You should only input text in lower case. | ||
*** | ||
### License | ||
I D0N7 C4R3ZORZ! Do whatever you want. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3892
116
35