Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
buildOptions(options = {}, defaultOptions = {}, globalOptions = {}) {
let builtOptions = mergeOptions(options, defaultOptions, globalOptions);
// Overwrite the validator's value method if it exists in the options and remove it since
// there is no need for it to be passed around
this.value = builtOptions.value || this.value;
delete builtOptions.value;
return new Options({
model: get(this, 'model'),
attribute: get(this, 'attribute'),
options: builtOptions
});
},