Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,17 @@ Device.prototype.toJSON = function toJSON() {
};

/**
* Small nifty thick that allows us to download a fresh set regexs from t3h
* Int3rNetz when we want to. We will be using the compiled version by default
* but users can opt-in for updates.
* Small nifty thick that allows us to download a fresh set regexs from a remote
* source. Package uses the compiled version by default, but allows for updating
* from the default source (no args) or a custom source, via the "remote"
* parameter.
*
* @param {Boolean} refresh Refresh the dataset from the remote
* @param {String} [remote] optionally specify a custom URL for regex sourcing
* @api public
*/
module.exports = function updater() {
module.exports = function updater(remote) {
try {
require('./lib/update').update(function updating(err, results) {
require('./lib/update').update(remote, function updating(err, results) {
if (err) {
console.log('[useragent] Failed to update the parsed due to an error:');
console.log('[useragent] '+ (err.message ? err.message : err));
Expand Down
Loading