mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-19 21:14:44 +08:00
This updates Rollup, SVGO and clean-css. Only clean-css had reported breaking changes, but we are not affected (Node compatibility removals and changes to features we don't use). R=jacktfranklin@chromium.org Bug: none Change-Id: I94c293e128d1ddb81f12036421a715da210e7633 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3060704 Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Paul Lewis <aerotwist@chromium.org>
24 lines
449 B
JavaScript
24 lines
449 B
JavaScript
var VENDOR_PREFIX_PATTERN = /(?:^|\W)(\-\w+\-)/g;
|
|
|
|
function unique(value) {
|
|
var prefixes = [];
|
|
var match;
|
|
|
|
while ((match = VENDOR_PREFIX_PATTERN.exec(value)) !== null) {
|
|
if (prefixes.indexOf(match[0]) == -1) {
|
|
prefixes.push(match[0]);
|
|
}
|
|
}
|
|
|
|
return prefixes;
|
|
}
|
|
|
|
function same(value1, value2) {
|
|
return unique(value1).sort().join(',') == unique(value2).sort().join(',');
|
|
}
|
|
|
|
module.exports = {
|
|
unique: unique,
|
|
same: same
|
|
};
|