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

cmacc-compiler

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmacc-compiler - npm Package Compare versions

Comparing version 2.0.19 to 2.0.20

test/cases/variable_in_mask_set_string_set/_entity_Individual.cmacc

2

package.json
{
"name": "cmacc-compiler",
"version": "2.0.19",
"version": "2.0.20",
"description": "Cmacc Compiler",

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

@@ -23,3 +23,2 @@ const find = require('./find');

from.data = x.data
}

@@ -30,3 +29,12 @@

from.type = to.type
from.data = to.data
if( to.type === 'string'){
from.data = to.data.replace(/\{\{([^}]*)\}\}/g, (match, variable) =>{
const split = x.data.split('.');
const res = split.slice(0, split.length - 1).join('.') + '.' + variable;
console.log(res)
return `{{${res}}}`;
})
}else{
from.data = to.data
}

@@ -33,0 +41,0 @@ }

@@ -80,4 +80,6 @@ const helpers = require('./helpers');

content: val.replace(/{{([^{]*)}}/g, function (match, name) {
const res = split.reduce((ast, val) => ast[val], ast);
return res[name]
const split2 = split.concat(name.split('.'));
const last = split2.pop();
const res = split2.reduce((ast, val) => ast[val], ast);
return res[last]
}),

@@ -84,0 +86,0 @@ variable: x.variable,

@@ -5,3 +5,3 @@ const url = require('path');

describe('variable_in_string', function () {
describe('variable_in_mask_complex', function () {

@@ -8,0 +8,0 @@ global.fs = require('fs');

@@ -5,3 +5,3 @@ const url = require('path');

describe('variable_in_string', function () {
describe('variable_in_mask', function () {

@@ -8,0 +8,0 @@ global.fs = require('fs');

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