Generates a default User-Agent string for Node.js HTTP requests. Version 1.0.0 is stable but unmaintained since 2015. It outputs strings like 'Node.js/<version> (<os>; <arch>)' and accepts optional app name and version (e.g., 'urllib/0.0.1 Node.js/...'). Unlike modern packages like 'useragent' or 'ua-parser-js', it only generates a string and has no parsing capabilities. Works with Node >=0.10.0. No releases or updates in the last 9 years.
npm install default-user-agentVerified import paths — ran on the pinned version, not inferred.
Shows how to generate a User-Agent string with and without custom app name/version.
Consider using a maintained alternative like 'useragent' or manually constructing the User-Agent string.
Upgrade Node.js to >=0.10.0.
Run 'npm install default-user-agent' to install it.
Use CommonJS require: const ua = require('default-user-agent');