Guest User

Untitled

a guest
Dec 7th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. const matchesSelectorFnName = R.find(
  2. R.propSatisfies(isNotNil, R.__, Element.prototype),
  3. ['matches', 'webkitMatchesSelector', 'msMatchesSelector'],
  4. );
  5.  
  6. export const matchesCSS = R.curry((cssRule, node) => node[matchesSelectorFnName](cssRule));
Add Comment
Please, Sign In to add comment