|
Last change
on this file since 9af201e was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
492 bytes
|
| Line | |
|---|
| 1 | var VENDOR_PREFIX_PATTERN = /(?:^|\W)(-\w+-)/g;
|
|---|
| 2 |
|
|---|
| 3 | function unique(value) {
|
|---|
| 4 | var prefixes = [];
|
|---|
| 5 | var match;
|
|---|
| 6 |
|
|---|
| 7 | // eslint-disable-next-line no-cond-assign
|
|---|
| 8 | while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {
|
|---|
| 9 | if (prefixes.indexOf(match[0]) == -1) {
|
|---|
| 10 | prefixes.push(match[0]);
|
|---|
| 11 | }
|
|---|
| 12 | }
|
|---|
| 13 |
|
|---|
| 14 | return prefixes;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | function same(value1, value2) {
|
|---|
| 18 | return unique(value1).sort().join(',') == unique(value2).sort().join(',');
|
|---|
| 19 | }
|
|---|
| 20 |
|
|---|
| 21 | module.exports = {
|
|---|
| 22 | unique: unique,
|
|---|
| 23 | same: same
|
|---|
| 24 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.