UNPKG

react-css-transition

Version:
19 lines (17 loc) 546 B
import removeVendorPrefix from "./removeVendorPrefix"; export function matchTransitionProperty(subject, property) { if (property === "all") { return true; } var sub = removeVendorPrefix(subject); var prop = removeVendorPrefix(property); if (sub.length < prop.length) { return false; } else if (sub.length === prop.length) { return sub === prop; } return sub.substr(0, prop.length) === prop; } export default matchTransitionProperty; //# sourceMappingURL=matchTransitionProperty.js.map