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

@cyberalien/conditional-replacements

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cyberalien/conditional-replacements - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

4

lib/replacements.js

@@ -33,7 +33,7 @@ "use strict";

const parts = code.split(':');
if (parts.length !== 2 || parts.shift() !== this.keyword) {
if (parts.length < 2 || parts.shift() !== this.keyword) {
return null;
}
// Get value, remove quotes
let value = parts.shift().trim();
let value = parts.join(':').trim();
if ((value.slice(0, 1) === '"' && value.slice(-1) === '"') ||

@@ -40,0 +40,0 @@ (value.slice(0, 1) === "'" && value.slice(-1) === "'")) {

{
"name": "@cyberalien/conditional-replacements",
"description": "Replacements in code",
"version": "0.0.1",
"version": "0.0.2",
"author": "Vjacheslav Trushkin",

@@ -27,5 +27,5 @@ "license": "(Apache-2.0 OR GPL-2.0)",

"@types/mocha": "^5.2.7",
"@types/node": "^12.12.22",
"@typescript-eslint/eslint-plugin": "^2.13.0",
"@typescript-eslint/parser": "^2.13.0",
"@types/node": "^12.12.25",
"@typescript-eslint/eslint-plugin": "^2.17.0",
"@typescript-eslint/parser": "^2.17.0",
"chai": "^4.2.0",

@@ -32,0 +32,0 @@ "eslint": "^6.8.0",

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