diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/lib/access.js')
-rw-r--r-- | deps/npm/node_modules/npm-registry-client/lib/access.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/lib/access.js b/deps/npm/node_modules/npm-registry-client/lib/access.js index c642d16f3fb..b671f6b5f21 100644 --- a/deps/npm/node_modules/npm-registry-client/lib/access.js +++ b/deps/npm/node_modules/npm-registry-client/lib/access.js @@ -1,30 +1,30 @@ module.exports = access -var assert = require("assert") +var assert = require('assert') function access (uri, params, cb) { - assert(typeof uri === "string", "must pass registry URI to access") - assert(params && typeof params === "object", "must pass params to access") - assert(typeof cb === "function", "muss pass callback to access") + assert(typeof uri === 'string', 'must pass registry URI to access') + assert(params && typeof params === 'object', 'must pass params to access') + assert(typeof cb === 'function', 'muss pass callback to access') - assert(typeof params.level === "string", "must pass level to access") + assert(typeof params.level === 'string', 'must pass level to access') assert( - ["public", "restricted"].indexOf(params.level) !== -1, + ['public', 'restricted'].indexOf(params.level) !== -1, "access level must be either 'public' or 'restricted'" ) assert( - params.auth && typeof params.auth === "object", - "must pass auth to access" + params.auth && typeof params.auth === 'object', + 'must pass auth to access' ) var body = { - access : params.level + access: params.level } var options = { - method : "POST", - body : JSON.stringify(body), - auth : params.auth + method: 'POST', + body: JSON.stringify(body), + auth: params.auth } this.request(uri, options, cb) } |