agreed-core
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -7,2 +7,7 @@ 'use strict'; | ||
var result = template; | ||
if (Array.isArray(template)) { | ||
return formatArray(template, args); | ||
} | ||
if (typeof template === 'object') { | ||
@@ -51,1 +56,14 @@ return formatObject(template, args); | ||
function formatArray(array, args) { | ||
var result = []; | ||
if (!array) { | ||
return array; | ||
} | ||
array.forEach((item) => { | ||
result.push(format(item, args)); | ||
}); | ||
return result; | ||
} | ||
{ | ||
"name": "agreed-core", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "agreed is a mock server and test client, agreed will be helper for Consumer Driven Contract", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,3 +58,3 @@ 'use strict'; | ||
}); | ||
assert.deepEqual(result, {a: true, b: [1,2,3, null], c: { aaaa: 'bbb' }}); | ||
assert.deepStrictEqual(result, {a: true, b: [1,2,3, null], c: { aaaa: 'bbb' }}); | ||
}); | ||
@@ -75,3 +75,3 @@ | ||
}); | ||
assert.deepEqual(result, { | ||
assert.deepStrictEqual(result, { | ||
a: { | ||
@@ -100,3 +100,5 @@ abc: '{:abc}' | ||
}); | ||
assert.deepEqual(result, { | ||
console.log(result); | ||
assert.deepStrictEqual(result, { | ||
a: { | ||
@@ -125,3 +127,3 @@ abc: '{:abc}' | ||
console.log(result); | ||
assert.deepEqual(result, { | ||
assert.deepStrictEqual(result, { | ||
a: { | ||
@@ -133,1 +135,2 @@ abc: 1 | ||
}); | ||
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
41884
1225