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

safe-regex2

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

safe-regex2 - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

eslint.config.js

4

index.js

@@ -15,3 +15,3 @@ 'use strict'

try { re = parse(re) } catch (err) { return false }
try { re = parse(re) } catch { return false }

@@ -37,3 +37,3 @@ let reps = 0

}
const stack = node.stack || (node.value && node.value.stack)
const stack = node.stack || node.value?.stack
if (!stack) return true

@@ -40,0 +40,0 @@

{
"name": "safe-regex2",
"version": "4.0.0",
"version": "4.0.1",
"description": "detect possibly catastrophic, exponential-time regular expressions",

@@ -13,4 +13,5 @@ "main": "index.js",

"@fastify/pre-commit": "^2.1.0",
"c8": "^7.14.0",
"standard": "^17.1.0",
"c8": "^10.1.3",
"eslint": "^9.17.0",
"neostandard": "^0.12.0",
"tape": "^5.7.5",

@@ -20,3 +21,4 @@ "tsd": "^0.31.0"

"scripts": {
"lint": "standard",
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "npm run test:unit && npm run test:typescript",

@@ -28,5 +30,18 @@ "test:typescript": "tsd",

"type": "git",
"url": "git://github.com/fastify/safe-regex.git"
"url": "git://github.com/fastify/safe-regex2.git"
},
"homepage": "https://github.com/fastify/safe-regex",
"bugs": {
"url": "https://github.com/fastify/safe-regex2/issues"
},
"homepage": "https://github.com/fastify/safe-regex2",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/fastify"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fastify"
}
],
"keywords": [

@@ -45,5 +60,22 @@ "catastrophic",

"contributors": [
"Matteo Collina <hello@matteocollina.com>"
{
"name": "Matteo Collina",
"email": "hello@matteocollina.com"
},
{
"name": "Gürgün Dayıoğlu",
"email": "hey@gurgun.day",
"url": "https://heyhey.to/G"
},
{
"name": "James Sumners",
"url": "https://james.sumners.info"
},
{
"name": "Frazer Smith",
"email": "frazer.dev@icloud.com",
"url": "https://github.com/fdawgs"
}
],
"license": "MIT"
}

@@ -8,3 +8,3 @@ type SafeRegex2 = (re: string | RegExp, opts?: { limit?: number }) => boolean

declare function safeRegex(...params: Parameters<SafeRegex2>): ReturnType<SafeRegex2>
declare function safeRegex (...params: Parameters<SafeRegex2>): ReturnType<SafeRegex2>
export = safeRegex

Sorry, the diff of this file is not supported yet

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