Socket
Socket
Sign inDemoInstall

useragent

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

useragent - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

lib/donotedit

33

lib/update.js

@@ -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');

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc