mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
12 lines
304 B
TypeScript
12 lines
304 B
TypeScript
|
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}`;
|
||
|
}
|