daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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));
RAW Paste Data
Top