1 | "use strict";
|
2 |
|
3 | var utils = require('./utils');
|
4 |
|
5 | var OldValue =
|
6 |
|
7 | function () {
|
8 | function OldValue(unprefixed, prefixed, string, regexp) {
|
9 | this.unprefixed = unprefixed;
|
10 | this.prefixed = prefixed;
|
11 | this.string = string || prefixed;
|
12 | this.regexp = regexp || utils.regexp(prefixed);
|
13 | }
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 | var _proto = OldValue.prototype;
|
20 |
|
21 | _proto.check = function check(value) {
|
22 | if (value.includes(this.string)) {
|
23 | return !!value.match(this.regexp);
|
24 | }
|
25 |
|
26 | return false;
|
27 | };
|
28 |
|
29 | return OldValue;
|
30 | }();
|
31 |
|
32 | module.exports = OldValue; |
\ | No newline at end of file |