SHARE
TWEET

Untitled

a guest Mar 26th, 2020 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { linq } from "@sinclair/linqbox";
  2.  
  3. const qsa = selector => document.querySelectorAll(selector);
  4.  
  5. const pairs = linq`
  6. from check in ${qsa("input[type=checkbox]")}
  7. join label in ${qsa("label")} on check.id equals label.htmlFor
  8. select { check, label }
  9. `;
  10.  
  11. console.log([...pairs]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top