-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
rofrischmann
committed
Nov 26, 2016
1 parent
cf014ce
commit 566dbcf
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default property => property.match(/^(Webkit|Moz|O|ms)/) !== null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export function sortPrefixedStyle(style) { | ||
return Object.keys(style).sort((left, right) => { | ||
if (isPrefixed(left) && !isPrefixed(right)) { | ||
return -1 | ||
} else if (!isPrefixed(left) && isPrefixed(right)) { | ||
return 1 | ||
} | ||
return 0 | ||
}).reduce((sortedStyle, prop) => { | ||
sortedStyle[prop] = style[prop] | ||
return sortedStyle | ||
}, { }) | ||
} |