Comparing version 2.1.1 to 2.1.2
@@ -16,2 +16,8 @@ 'use strict'; | ||
/** | ||
* Update the regexp.js file | ||
* | ||
* @param {Function} callback Completion callback. | ||
* @api public | ||
*/ | ||
exports.update = function update(callback) { | ||
@@ -43,2 +49,9 @@ // Fetch the remote resource as that is frequently updated | ||
/** | ||
* Parse the given sources. | ||
* | ||
* @param {Array} sources String versions of the source | ||
* @param {Function} callback completion callback | ||
* @api public | ||
*/ | ||
exports.parse = function parse(sources, callback) { | ||
@@ -151,5 +164,14 @@ var results = {}; | ||
/** | ||
* Generate the regular expressions file source code. | ||
* | ||
* @param {Object} results The parsed result of the regexp.yaml. | ||
* @param {Function} callback Completion callback | ||
* @api public | ||
*/ | ||
exports.generate = function generate(results, callback) { | ||
var regexps = [ | ||
'var parser;' | ||
'"use strict";' | ||
, exports.LEADER | ||
, 'var parser;' | ||
, 'exports.browser = Object.create(null);' | ||
@@ -206,1 +228,10 @@ , results.user_agent_parsers.join('\n') | ||
exports.output = path.resolve(__dirname, '..', 'lib', 'regexps.js'); | ||
/** | ||
* The leader that needs to be added so people know they shouldn't touch all the | ||
* things. | ||
* | ||
* @type {String} | ||
* @api private | ||
*/ | ||
exports.LEADER = fs.readFileSync(path.join(__dirname, 'donotedit'), 'UTF-8'); |
{ | ||
"name": "useragent", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Fastest, most accurate & effecient user agent string parser, uses Browserscope's research for parsing", | ||
@@ -5,0 +5,0 @@ "author": "Arnout Kazemier", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2334632
23
3933