Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove updated time (but leave date) from npm search results

  • Loading branch information...
commit 1849771efb232bfe273ad53342eb61ce25fb339d 1 parent 57003ea
@timoxley authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/search.js
View
5 lib/search.js
@@ -94,6 +94,7 @@ function stripData (data) {
&& (new Date(data.time.modified).toISOString()
.split("T").join(" ")
.replace(/:[0-9]{2}\.[0-9]{3}Z$/, ""))
+ .slice(0, -5) // remove time
|| "(prehistoric)"
}
}
@@ -145,8 +146,8 @@ function prettify (data, args) {
var longest = []
, spaces
, maxLen = npm.config.get("description")
- ? [20, 60, 20, 20, Infinity]
- : [20, 20, 20, Infinity]
+ ? [20, 60, 20, 10, Infinity]
+ : [20, 20, 10, Infinity]
, headings = npm.config.get("description")
? ["NAME", "DESCRIPTION", "AUTHOR", "DATE", "KEYWORDS"]
: ["NAME", "AUTHOR", "DATE", "KEYWORDS"]
Please sign in to comment.
Something went wrong with that request. Please try again.