basant307/AI_Governance_Project
048
1let utils = require('./utils')2 3class OldValue {4 constructor(unprefixed, prefixed, string, regexp) {5 this.unprefixed = unprefixed6 this.prefixed = prefixed7 this.string = string || prefixed8 this.regexp = regexp || utils.regexp(prefixed)9 }10 11 /**12 * Check, that value contain old value13 */14 check(value) {15 if (value.includes(this.string)) {16 return !!value.match(this.regexp)17 }18 return false19 }20}21 22module.exports = OldValue23 