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.3.4 to 0.3.5

4

api.d.ts

@@ -60,6 +60,8 @@ export as namespace regexpToAst

export type Range = { from: number; to: number }
export interface Set extends IRegExpAST {
type: "Set"
complement: boolean
value: number[]
value: (number | Range)[]
quantifier?: Quantifier

@@ -66,0 +68,0 @@ }

@@ -0,1 +1,13 @@

## 0.3.5 (7-12-2018)
* A Set AST can now contain ranges of char codes as well as single char codes.
```typescript
export interface Set extends IRegExpAST {
type: "Set"
complement: boolean
value: (number | Range)[]
quantifier?: Quantifier
}
```
## 0.3.4 (6-16-2018)

@@ -2,0 +14,0 @@

@@ -438,10 +438,5 @@ ;(function(root, factory) {

}
for (
var charCode = from.value;
charCode <= to.value;
charCode++
) {
set.push(charCode)
}
set.push({ from: from.value, to: to.value })
} else {
// literal dash
insertToSet(from.value, set)

@@ -458,3 +453,3 @@ set.push(cc("-"))

return { type: "Set", complement: complement, value: uniq(set) }
return { type: "Set", complement: complement, value: set }
}

@@ -785,16 +780,2 @@

function uniq(arr) {
var setMap = {}
arr.forEach(function(item) {
setMap[item] = item
})
var set = []
for (var key in setMap) {
set.push(setMap[key])
}
return set
}
function insertToSet(item, set) {

@@ -980,5 +961,5 @@ if (item.length !== undefined) {

BaseRegExpVisitor: BaseRegExpVisitor,
VERSION: "0.3.4"
VERSION: "0.3.5"
}
}
)
{
"name": "regexp-to-ast",
"version": "0.3.4",
"version": "0.3.5",
"main": "lib/regexp-to-ast.js",

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

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