X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Fnode_modules%2Fnpm-registry-client%2Flib%2Fstars.js;fp=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Fnode_modules%2Fnpm-registry-client%2Flib%2Fstars.js;h=ba47f2c1efc463725f5b790c701f04dd1acb9aa0;hb=2529be6d456deeb07c128603ce4971f1dc29b695;hp=0000000000000000000000000000000000000000;hpb=2636fc31c16c23711cf2b06a4ae8537bba9c1d35;p=simantics%2Fdistrict.git diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-registry-client/lib/stars.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-registry-client/lib/stars.js new file mode 100644 index 00000000..ba47f2c1 --- /dev/null +++ b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-registry-client/lib/stars.js @@ -0,0 +1,18 @@ +module.exports = stars + +var assert = require('assert') +var url = require('url') + +function stars (uri, params, cb) { + assert(typeof uri === 'string', 'must pass registry URI to stars') + assert(params && typeof params === 'object', 'must pass params to stars') + assert(typeof cb === 'function', 'must pass callback to stars') + + var auth = params.auth + var name = params.username || (auth && auth.username) + if (!name) return cb(new Error('must pass either username or auth to stars')) + var encoded = encodeURIComponent(name) + var path = '-/_view/starredByUser?key="' + encoded + '"' + + this.request(url.resolve(uri, path), { auth: auth }, cb) +}