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

varson

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

varson - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

14

package.json
{
"name": "varson",
"version": "2.0.3",
"version": "2.1.0",
"description": "",

@@ -22,12 +22,12 @@ "main": "index.js",

"dependencies": {
"aug": "^2.0.0",
"aug": "^3.0.1",
"lodash.get": "^4.4.2"
},
"devDependencies": {
"eslint": "^4.9.0",
"eslint-config-firstandthird": "^4.0.1",
"eslint-plugin-import": "^2.1.0",
"ms": "^2.0.0",
"tap": "^10.7.2"
"eslint": "^5.16.0",
"eslint-config-firstandthird": "^4.3.0",
"eslint-plugin-import": "^2.17.2",
"ms": "^2.1.1",
"tap": "^13.1.2"
}
}

@@ -1,2 +0,4 @@

const test = require('tap').test;
const tap = require('tap');
const test = tap.test;
const skip = function() {};
const varson = require('../');

@@ -50,2 +52,14 @@

test('should keep the if boolean false', (t) => {
t.plan(1);
const result = varson({
first: '',
hasFirst: '{{ first ? true : false}}'
});
t.deepEqual(result, {
first: '',
hasFirst: false
});
});
test('should keep the if number', (t) => {

@@ -640,2 +654,57 @@ t.plan(1);

test('variables in method arguments', (t) => {
t.plan(1);
const add = function(a, b) {
return a + b;
};
const result = varson({
a: 1,
b: 2,
equals: '{{add(a, b)}}'
}, {
add
});
t.deepEqual(result, {
a: 1,
b: 2,
equals: 3
});
});
test('function with complex args', (t) => {
t.plan(1);
const echo = function(a) {
return a;
};
const result = varson({
first: 'bob',
equals: '{{echo("my name is " + first)}}'
}, {
echo
});
t.deepEqual(result, {
first: 'bob',
equals: 'my name is bob'
});
});
test('support backticks', (t) => {
t.plan(1);
const join = function(a, b) {
return a + b;
};
const result = varson({
first: 'bob',
last: 'smith',
equals: '{{join(`my name is ${first} `, last)}}'
}, {
join
});
t.deepEqual(result, {
first: 'bob',
last: 'smith',
equals: 'my name is bob smith'
});
});
test('promises', (t) => {

@@ -642,0 +711,0 @@ const results = varson({

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