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

regexp-to-ast

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regexp-to-ast - npm Package Compare versions

Comparing version 0.2.0 to 0.2.2

2

api.d.ts
export as namespace regexpToAst
export const VERSION: number
export class RegExpParser {

@@ -4,0 +6,0 @@ pattern: (input: string) => RegExpAst

@@ -0,1 +1,10 @@

## 0.2.2 (2018-4-10)
- VERSION constant exported.
## 0.2.1 (2018-4-10)
- Fixed class atoms to allow syntax characters (?, +, *, ...).
- Fixed regular atoms to allow closing curly and square brackets.
## 0.2.0 (2018-4-7)

@@ -2,0 +11,0 @@

41

lib/parser.js

@@ -378,3 +378,3 @@ ;(function(root, factory) {

RegExpParser.prototype.patternCharacterAtom = function() {
RegExpParser.prototype.classPatternCharacterAtom = function() {
switch (this.peekChar()) {

@@ -390,29 +390,5 @@ // istanbul ignore next

// istanbul ignore next
case "^":
// istanbul ignore next
case "$":
// istanbul ignore next
case "\\":
// istanbul ignore next
case ".":
// istanbul ignore next
case "*":
// istanbul ignore next
case "+":
// istanbul ignore next
case "?":
// istanbul ignore next
case "(":
// istanbul ignore next
case ")":
// istanbul ignore next
case "[":
// istanbul ignore next
case "]":
// istanbul ignore next
case "{":
// istanbul ignore next
case "}":
// istanbul ignore next
case "|":
throw Error("TBD")

@@ -485,3 +461,3 @@ default:

default:
return this.patternCharacterAtom()
return this.classPatternCharacterAtom()
}

@@ -597,9 +573,7 @@ }

case "[":
// TODO: can be literal atom
// istanbul ignore next
case "]":
// istanbul ignore next
case "{":
// TODO: can be literal atom
// istanbul ignore next
case "}":
// istanbul ignore next
case "|":

@@ -720,5 +694,5 @@ // istanbul ignore next

case "[":
case "]":
// TODO: can be interperted literally
case "{":
case "}":
// TODO: can be interperted literally
case "|":

@@ -879,5 +853,6 @@ case "/":

return {
RegExpParser: RegExpParser
RegExpParser: RegExpParser,
VERSION: "0.2.2"
}
}
)
{
"name": "regexp-to-ast",
"version": "0.2.0",
"version": "0.2.2",
"main": "lib/parser.js",

@@ -5,0 +5,0 @@ "repository": "https://github.com/bd82/regexp-to-ast.git",

@@ -0,1 +1,2 @@

[![npm version](https://badge.fury.io/js/regexp-to-ast.svg)](https://badge.fury.io/js/regexp-to-ast)
[![CircleCI](https://circleci.com/gh/bd82/regexp-to-ast.svg?style=svg)](https://circleci.com/gh/bd82/regexp-to-ast)

@@ -43,2 +44,4 @@ [![Coverage Status](https://coveralls.io/repos/github/bd82/regexp-to-ast/badge.svg?branch=master)](https://coveralls.io/github/bd82/regexp-to-ast?branch=master)

* Use polyFill for [string.prototype.at](https://github.com/mathiasbynens/String.prototype.at)
to support unicode characters outside BMP.
* Descriptive error messages.

@@ -45,0 +48,0 @@ * Position information in error messages.

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