0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-06 22:40:26 -05:00
verdaccio/packages/config/src/agent.ts

12 lines
304 B
TypeScript
Raw Normal View History

import assert from 'assert';
import _ from 'lodash';
const pkgVersion = require('../package.json').version;
const pkgName = require('../package.json').name;
export function getUserAgent(): string {
assert(_.isString(pkgName));
assert(_.isString(pkgVersion));
return `${pkgName}/${pkgVersion}`;
}