Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stars.js')
-rw-r--r--lib/stars.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/stars.js b/lib/stars.js
index e8cb23fb4..4ad8f02e5 100644
--- a/lib/stars.js
+++ b/lib/stars.js
@@ -1,10 +1,10 @@
module.exports = stars
-gstars.usage = "npm stars [<user>]"
+stars.usage = 'npm stars [<user>]'
-var npm = require("./npm.js")
- , log = require("npmlog")
- , mapToRegistry = require("./utils/map-to-registry.js")
+var npm = require('./npm.js')
+var log = require('npmlog')
+var mapToRegistry = require('./utils/map-to-registry.js')
function stars (args, cb) {
npm.commands.whoami([], true, function (er, username) {
@@ -20,12 +20,12 @@ function stars (args, cb) {
if (er.code !== 'ENEEDAUTH') return cb(er)
}
- mapToRegistry("", npm.config, function (er, uri, auth) {
+ mapToRegistry('', npm.config, function (er, uri, auth) {
if (er) return cb(er)
var params = {
- username : name,
- auth : auth
+ username: name,
+ auth: auth
}
npm.registry.stars(uri, params, showstars)
})
@@ -35,9 +35,9 @@ function stars (args, cb) {
if (er) return cb(er)
if (data.rows.length === 0) {
- log.warn("stars", "user has not starred any packages.")
+ log.warn('stars', 'user has not starred any packages.')
} else {
- data.rows.forEach(function(a) {
+ data.rows.forEach(function (a) {
console.log(a.value)
})
}