@cyberalien/conditional-replacements
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package