mirror of
https://github.com/faisalman/ua-parser-js.git
synced 2025-10-01 01:37:43 +03:00
Add new feature: parse user-agent in CLI using npx ua-parser-js "[INSERT-UA-HERE]"
and print the result in JSON format
This commit is contained in:
4
script/cli.js
Executable file
4
script/cli.js
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const UAParser = require('ua-parser-js');
|
||||
console.log(JSON.stringify(process.argv.slice(2).map(ua => UAParser(ua))));
|
Reference in New Issue
Block a user