1.0.1 • Published 2 years ago

nodejs-user-agent v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

nodejs-user-agent

NPM version npm download

User agent string for Node.js http request.

Based on default-user-agent

Install

$ npm install nodejs-user-agent

Usage

import { ua } from 'nodejs-user-agent';

// darwin
console.log(ua()); // 'Node.js/14.16.1 (macOS Big Sur; x64)'
console.log(ua('urllib', '0.1.1')); // 'urllib/0.1.1 Node.js/14.16.1 (macOS Big Sur; x64)'

// linux
// 'Node.js/14.16.1 (Linux 3.13; x64)'

License

MIT