]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-registry-client/lib/tag.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / npm-registry-client / lib / tag.js
1 module.exports = tag
2
3 var assert = require('assert')
4
5 function tag (uri, params, cb) {
6   assert(typeof uri === 'string', 'must pass registry URI to tag')
7   assert(params && typeof params === 'object', 'must pass params to tag')
8   assert(typeof cb === 'function', 'must pass callback to tag')
9
10   assert(typeof params.version === 'string', 'must pass version to tag')
11   assert(typeof params.tag === 'string', 'must pass tag name to tag')
12   assert(
13     params.auth && typeof params.auth === 'object',
14     'must pass auth to tag'
15   )
16
17   var options = {
18     method: 'PUT',
19     body: JSON.stringify(params.version),
20     auth: params.auth
21   }
22   this.request(uri + '/' + params.tag, options, cb)
23 }