2cb04bf3a7cd6812df5ff75ea3c9f1e39f27ce09cf3f2dbeffd53d7728269e8cdc896cd5f48dcafdb033b005bf9e5a1e4610c82e37158e8e70b2b2f29b2b5c 606 B

123456789101112131415161718192021222324252627282930
  1. "use strict";
  2. var utils = require('./utils');
  3. var OldValue = /*#__PURE__*/function () {
  4. function OldValue(unprefixed, prefixed, string, regexp) {
  5. this.unprefixed = unprefixed;
  6. this.prefixed = prefixed;
  7. this.string = string || prefixed;
  8. this.regexp = regexp || utils.regexp(prefixed);
  9. }
  10. /**
  11. * Check, that value contain old value
  12. */
  13. var _proto = OldValue.prototype;
  14. _proto.check = function check(value) {
  15. if (value.includes(this.string)) {
  16. return !!value.match(this.regexp);
  17. }
  18. return false;
  19. };
  20. return OldValue;
  21. }();
  22. module.exports = OldValue;