https://github.com/node-modules/default-user-agent
Default user agent string for Node.js http request
https://github.com/node-modules/default-user-agent
Last synced: 12 days ago
JSON representation
Default user agent string for Node.js http request
- Host: GitHub
- URL: https://github.com/node-modules/default-user-agent
- Owner: node-modules
- License: other
- Created: 2014-03-13T01:20:23.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-01-12T06:27:41.000Z (over 1 year ago)
- Last Synced: 2025-05-07T22:38:06.675Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 49.8 KB
- Stars: 11
- Watchers: 21
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE.txt
- Authors: AUTHORS
Awesome Lists containing this project
README
default-user-agent
=======[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Gittip][gittip-image]][gittip-url]
[![David deps][david-image]][david-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/default-user-agent.svg?style=flat-square
[npm-url]: https://npmjs.org/package/default-user-agent
[travis-image]: https://img.shields.io/travis/node-modules/default-user-agent.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/default-user-agent
[coveralls-image]: https://img.shields.io/coveralls/node-modules/default-user-agent.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/node-modules/default-user-agent?branch=master
[gittip-image]: https://img.shields.io/gittip/fengmk2.svg?style=flat-square
[gittip-url]: https://www.gittip.com/fengmk2/
[david-image]: https://img.shields.io/david/node-modules/default-user-agent.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/default-user-agent
[download-image]: https://img.shields.io/npm/dm/default-user-agent.svg?style=flat-square
[download-url]: https://npmjs.org/package/default-user-agentDefault user agent string for Node.js http request
## Install
```bash
$ npm install default-user-agent
```## Usage
```js
var ua = require('default-user-agent');// darwin
console.log(ua()); // 'Node.js/0.11.15 (OS X Yosemite; x64)'
console.log(ua('urllib', '0.0.1')); // 'urllib/0.0.1 Node.js/0.11.15 (OS X Yosemite; x64)'// linux
// 'Node.js/0.11.15 (Linux 3.13; x64)'
```## License
[MIT](LICENSE.txt)