queryselector.js

2.0.1 • Public • Published

queryselector.js

Helper function returning all elements in the DOM that matches a specified CSS selector. The function returns a single element when selector starts with a sign character: #foo. It returns a NodeList for all other cases.

Installation

$ npm i --save queryselector.js

Example

import $ from 'queryselector.js';

let myFoo = $('#foo');

// A convenience method is added to the Node and NodeList prototypes:
let myBar = myFoo.$('.bar');

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i queryselector.js

    Weekly Downloads

    2

    Version

    2.0.1

    License

    MIT

    Last publish

    Collaborators

    • patrickpietens