Skip to content

Commit

Permalink
Add format to emails count.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Oct 22, 2015
1 parent b6a0fc6 commit 3a3c0d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"homepage": "https://github.com/lgaticaq/hubot-hesidohackeado#readme",
"dependencies": {
"filesize": "^3.1.3",
"moment": "^2.10.6"
"moment": "^2.10.6",
"underscore.string": "^3.2.2"
},
"devDependencies": {
"chai": "^3.4.0",
Expand Down
3 changes: 2 additions & 1 deletion src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

filesize = require("filesize")
moment = require("moment")
numberFormat = require("underscore.string/numberFormat")

module.exports = (robot) ->
emailPattern = "([\\w.-]+@[\\w.-]+\\.[a-zA-Z.]{2,6})"
Expand Down Expand Up @@ -46,7 +47,7 @@ module.exports = (robot) ->
text += ">*Autor*: #{d.author}\n"
text += ">*Sitio*: #{d.source_provider}\n"
text += ">*Red*: #{d.source_network}\n"
text += ">*Emails*: #{d.emails_count}\n"
text += ">*Emails*: #{numberFormat(d.emails_count, 0, ",", ".")}\n"
text += ">*Tamaño*: #{filesize(d.source_size)}\n"
text += ">*Enlace*: #{d.details}\n\n"
res.send text
Expand Down
2 changes: 1 addition & 1 deletion test/hesidohackeado_test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe "hesidohackeado", ->
">*Autor*: smitz\n" +
">*Sitio*: siph0n\n" +
">*Red*: clearnet\n" +
">*Emails*: 7744\n" +
">*Emails*: 7.744\n" +
">*Tamaño*: #{filesize(2721878)}\n" +
">*Enlace*: https://hesidohackeado.com/leak/siph0n-4033\n\n"
]
Expand Down

0 comments on commit 3a3c0d9

Please sign in to comment.