Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regexp-parser

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexp-parser - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

38

lib/parser.js
'use strict';
var State = require('./state');
var util = require('./util');
var debug = require('debug')('regex-parser');
const State = require('./state');
const util = require('./util');
const debug = require('debug')('regex-parser');
const
const CONCAT_CHAR = String.fromCharCode(8);
var CONCAT_CHAR = String.fromCharCode(8);
module.exports = Parser;

@@ -43,5 +43,4 @@

var i, len, c;
for (i = 0, len = pattern.length; i < len; ++i) {
c = pattern.charAt(i);
for (let i = 0, len = pattern.length; i < len; ++i) {
let c = pattern.charAt(i);

@@ -134,3 +133,3 @@ if (isInput(c)) {

var operator = this.operatorStack.pop();
const operator = this.operatorStack.pop();

@@ -161,4 +160,4 @@ // Check which operator it is

// pop 2 elements
var B = this._pop();
var A = this._pop();
let B = this._pop();
let A = this._pop();
if (!A || !B) return false;

@@ -179,4 +178,4 @@

Parser.prototype._push = function (input) {
var start = new State();
var end = new State();
let start = new State();
let end = new State();
start.addTransition(input, end);

@@ -300,5 +299,5 @@

}
}
}
return res;
return res;
};

@@ -341,7 +340,6 @@

function concatExpand(str) {
var ret = '';
var i, len, cLeft, cRight;
for (i = 0, len = str.length; i < len - 1; i++) {
cLeft = str[i];
cRight = str[i + 1];
let ret = '';
for (let i = 0, len = str.length; i < len - 1; i++) {
let cLeft = str[i];
let cRight = str[i + 1];
ret += cLeft;

@@ -348,0 +346,0 @@ if (isInput(cLeft) || isRightParanthesis(cLeft) || cLeft === '*') {

{
"name": "regexp-parser",
"version": "0.1.2",
"version": "0.1.3",
"description": "an elegant regular expression parser purely implemented in javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

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