source: node_modules/autoprefixer/lib/old-value.js@ 2058e5c

Last change on this file since 2058e5c was 2058e5c, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Working / before login

  • Property mode set to 100644
File size: 463 bytes
RevLine 
[2058e5c]1let utils = require('./utils')
2
3class OldValue {
4 constructor(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 /**
12 * Check, that value contain old value
13 */
14 check(value) {
15 if (value.includes(this.string)) {
16 return !!value.match(this.regexp)
17 }
18 return false
19 }
20}
21
22module.exports = OldValue
Note: See TracBrowser for help on using the repository browser.