You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

nginxparser

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nginxparser - npm Package Compare versions

Comparing version
1.2.2
to
1.2.3
+9
test.js
var NginxParser = require('./');
var parser = new NginxParser('$remote_addr [$time_local]');
var line = '127.0.0.1 [2015 08 12]'
parser.parseLine(line, console.log);
var parser = new NginxParser('[$time_local] $remote_addr');
var line = '[2015 08 12] 127.0.0.1'
parser.parseLine(line, console.log);
+7
-2

@@ -12,6 +12,11 @@ var fs = require('fs')

var Parser = module.exports = function (format) {
format = format.replace('[' , '\[')
this.parser = format;
this.directives = {};
var prefix = format.match(/^[^\$]*/);
if (prefix) {
format = this.escape(prefix[0]) + format.slice(prefix[0].length);
}
this.parser = format;
var directive = /\$([a-z_]+)(.)?([^\$]+)?/g

@@ -18,0 +23,0 @@ , match, regex, boundary, i = 1;

{ "name" : "nginxparser",
"description" : "Parse Nginx log files",
"version" : "1.2.2",
"version" : "1.2.3",
"homepage" : "http://github.com/chriso/nginx_parser",

@@ -5,0 +5,0 @@ "author" : "Chris O'Hara <cohara87@gmail.com>",