New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

krl-stdlib

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

krl-stdlib - npm Package Compare versions

Comparing version 0.45.1 to 0.45.4

2

package.json
{
"name": "krl-stdlib",
"version": "0.45.1",
"version": "0.45.4",
"description": "Standard library for KRL",

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

@@ -189,5 +189,9 @@ var _ = require("lodash");

if(type === "RegExp"){
if(val_type === "String"){
return new RegExp(val);
var regexSrc = types.toString(val);
if(val_type !== "String" && /^\[[a-z]+\]$/i.test(regexSrc)){
regexSrc = regexSrc
.replace(/^\[/, "\\[")
.replace(/\]$/, "\\]");
}
return new RegExp(regexSrc);
}

@@ -194,0 +198,0 @@ throw new TypeError("Cannot use the .as(\""+type+"\") operator with " + types.toString(val) + " (type " + val_type + ")");

@@ -306,2 +306,7 @@ var _ = require("lodash");

t.equals(stdlib.as(defaultCTX, "^a.*z$", "RegExp").source, /^a.*z$/.source);
t.equals(stdlib.as(defaultCTX, null, "RegExp").source, "null");
t.equals(stdlib.as(defaultCTX, 123, "RegExp").source, "123");
t.equals(stdlib.as(defaultCTX, _.noop, "RegExp").source, "\\[Function\\]");
t.equals(stdlib.as(defaultCTX, "[Function]", "RegExp").source, "[Function]");
var test_regex = /^a.*z$/;

@@ -308,0 +313,0 @@ tf("as", [test_regex, "RegExp"], test_regex);

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