项目作者: azu

项目描述 :
[WIP][Not Complete][Idea] User-Agent Client Hints library based on User-Agent.
高级语言: TypeScript
项目地址: git://github.com/azu/ua-client-hints-parser.git
创建时间: 2020-10-08T14:30:23Z
项目社区:https://github.com/azu/ua-client-hints-parser

开源协议:MIT License

下载


ua-client-hints-parser

User-Agent Client Hints library based on User-Agent.

Motivation

Existing UA parser library is large.

  • js@0.7.22"">https://bundlephobia.com/result?p=ua-parser-js@0.7.22
  • agents@1.0.559"">https://bundlephobia.com/result?p=user-agents@1.0.559
  • bowser@2.11.0"">https://bundlephobia.com/result?p=bowser@2.11.0
  • parse@0.1.12"">https://bundlephobia.com/result?p=user-agent-parse@0.1.12

Almost user does not need old browser detection in the browser.
So, We need to get simple API like https://github.com/WICG/ua-client-hints.

This project try it.

  • LightWeight
  • Own UA dictionary
  • Simple
  • Async API like ua-client-hints
    • User can switch to ua-client-hints API

Solution

  • The library user inject own detection dictionary
    • Use peerDependencies
  • This library/tool generate detection dictionary for needs

Install

Install with npm:

  1. npm install ua-client-hints-parser

Usage

  • Write usage instructions

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

  1. npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu