1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 00:27:24 -04:00
notes/node_modules/autoprefixer/lib/old-value.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

31 lines
675 B
JavaScript

(function() {
var OldValue, utils;
utils = require('./utils');
OldValue = (function() {
function OldValue(unprefixed, prefixed, string, regexp) {
this.unprefixed = unprefixed;
this.prefixed = prefixed;
this.string = string;
this.regexp = regexp;
this.regexp || (this.regexp = utils.regexp(this.prefixed));
this.string || (this.string = this.prefixed);
}
OldValue.prototype.check = function(value) {
if (value.indexOf(this.string) !== -1) {
return !!value.match(this.regexp);
} else {
return false;
}
};
return OldValue;
})();
module.exports = OldValue;
}).call(this);