Created
November 21, 2017 22:44
-
-
Save suissa/ea5a715690c4d108f60e6f5c623fe5c0 to your computer and use it in GitHub Desktop.
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
const $$ = ( selector, context = document ) => | |
( selector[ 0 ] === '#' ) // OU COM REGEX? | |
? document.getElementById( selector ) | |
: context.querySelectorAll( selector ) | |
$$( '#myjQuery' ).innerHTML = $$( 'div' ).length | |
$( '#jQuery' ).innerHTML = $( 'div' ).length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment