Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "json-e", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "json parameterization module inspired from json-parameterization", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
@@ -0,1 +1,3 @@ | ||
/* eslint-disable */ | ||
const {Parser} = require('./parser'); | ||
@@ -9,3 +11,3 @@ const Tokenizer = require("../src/tokenizer"); | ||
isArray, isObject, | ||
isTruthy, isFunction | ||
isTruthy | ||
} = require('./type-utils'); | ||
@@ -140,7 +142,3 @@ var addBuiltins = require('./builtins'); | ||
let result = render(template['$json'], context); | ||
if (result.length === 0) { | ||
throw new TemplateError(`$json returns undefined property because functions are not allowed in JSON`); | ||
} | ||
return stringify(result); | ||
return stringify(render(template['$json'], context)); | ||
}; | ||
@@ -468,6 +466,4 @@ | ||
} | ||
if (isFunction(result)) { | ||
throw new TemplateError('$eval ' + template.$eval + ' doesn\'t get any arguments in template') | ||
} | ||
return result; | ||
}; |
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
86281
1289