Skip to content
Browse files

Simple test for making repoUrls hackisk smaller

  • Loading branch information...
1 parent 79d5813 commit cbabf3a71b62db36e2aed0beb76e752b5d6e8e8f @eirikb committed Feb 6, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 nipster.js
View
6 nipster.js
@@ -33,7 +33,11 @@ updatePackages(raw, function(err, raw) {
var repo = raw.packages[r.name],
author = repo.author;
- if (r.url) repoUrls[i] = r.url;
+ if (r.url) {
+ repoUrls[i] = r.url;
+ } else {
+ repoUrls[i] = 0;
+ }
if (author) {
if (author.url) authorUrls[i] = repo.author.url;
author = author.name;

3 comments on commit cbabf3a

@sindresorhus

Even smaller: repoUrls[i] = r.url || 0;

@eirikb
Owner
eirikb commented on cbabf3a Feb 6, 2012

Or ternary, but it's more a test until I see how it works

@eirikb
Owner
eirikb commented on cbabf3a Feb 6, 2012

Using your suggestion now, in 3c9712a

Please sign in to comment.
Something went wrong with that request. Please try again.