1var VENDOR_PREFIX_PATTERN = /(?:^|\W)(\-\w+\-)/g;
2
3function unique(value) {
4  var prefixes = [];
5  var match;
6
7  while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {
8    if (prefixes.indexOf(match[0]) == -1) {
9      prefixes.push(match[0]);
10    }
11  }
12
13  return prefixes;
14}
15
16function same(value1, value2) {
17  return unique(value1).sort().join(',') == unique(value2).sort().join(',');
18}
19
20module.exports = {
21  unique: unique,
22  same: same
23};
24