Skip to content

Commit

Permalink
add "npm info"
Browse files Browse the repository at this point in the history
  • Loading branch information
thejh committed Sep 28, 2011
1 parent 70e79b0 commit 82d380b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bot.coffee
Expand Up @@ -321,6 +321,14 @@ commands =
else
msg = "owners: " + ("#{o.name} <#{o.email}>" for o in owners).join ', '
reply msg
info: (message, [package], reply) ->
if not package?
return reply "package name missing", error: true
updateNpm (npmData) ->
if not npmData[package]?
return reply "couldn't find that package"
package = npmData[package]
reply "#{package.name} by #{package.author.name}, version #{package['dist-tags'].latest}: #{package.description}"
search: (message, keywords, reply) ->
NAMESLIMIT = 20
if keywords.length == 0
Expand Down

0 comments on commit 82d380b

Please sign in to comment.