Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function ParameterValue (parameter, raw) {
var pPath = JsonRefs.pathFromPointer(parameter.ptr);
var processed = false;
var schema = parameter.computedSchema;
var error;
var isValid;
var processedValue;
this.raw = raw;
// Use Object.defineProperty for 'value' to allow for lazy processing of the raw value
Object.defineProperties(this, {
error: {
enumerable: true,
get: function () {
// Always call this.valid to ensure we validate the value prior to returning any values
if (this.valid === true) {
return undefined;