3rd-Eden / useragent

Useragent parser for Node.js, ported from browserscope.org
MIT License
897 stars 137 forks source link

Change `update` 's parameter to accept a custom remote location #91

Closed frantz closed 6 years ago

frantz commented 7 years ago

Former boolean refresh parameter was not even used. New customRemote allows user to specify its own location for the remote yaml file. compatibility with old API (boolean as first argument) is maintained.

So I can decide to have more up-to-date regexes without having to fetch last revision from uap-core master

const useragent = require('useragent')
useragent('https://raw.githubusercontent.com/ua-parser/uap-core/9a83db4ce3e66ee53847070652ecfcb1e0eb0bba/regexes.yaml')
3rd-Eden commented 6 years ago

Fixed with #124 as it added a NODE_ENV flag for custom parsers.