# querybuddy

> a query language for DOM manipulation

Latest version **2.0.3** (published 2018-02-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install querybuddy
pnpm add querybuddy
yarn add querybuddy
bun add querybuddy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2018-02-11 |
| First published | 2017-10-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 25.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JsonBourne |
| Maintainers | joey8williams |

## Links

- npm: https://www.npmjs.com/package/querybuddy
- npm.io page: https://npm.io/package/querybuddy

## Recent versions

- 2.0.3 (latest) — 2018-02-11
- 2.0.2 — 2018-02-11
- 2.0.1 — 2018-02-11
- 2.0.0 — 2018-02-11
- 1.1.0 — 2018-02-11
- 1.0.0 — 2017-10-14

## README

# qlib
a generic library for gathering DOM elements


This library aims to be a modest sizzle engine, as light weight as possible while still providing minor performance gains when querying the DOM manually.

## Usage
1. Install qlib to your project's web directory.
    * via npm: _npm install querybuddy_
2. Import query and queryOne to the files that need to query the DOM
    * ES6 Import Syntax: `import {query, queryOne} from 'querybuddy';`
    * Require Syntax a: `const query = require('querybuddy').query;`
    * Require Syntax b: `const queryOne = require('querybuddy').queryOne;`
3. Query the DOM similar to document.query### or jQuery's $(selector)

### Parameters:
#### query:
query(selectorString,parent,limit)
1. selectorString: your CSS compliant selector string. Any valid selector will work
2. parent: a parent element to query within. Defaults to document if parent is not specified.
3. limit: an integer value representing the number of results to return. If no limit is specified, all results will be returned. If n limit is specified, the first n results will be returned. If n=1 limit is specified, queryOne will be called.

#### queryOne:
queryOne(selectorString,parent)
1. selectorString: your CSS compliant selector string. Any valid selector will work
2. parent: a parent element to query within. Defaults to document if parent is not specified.


## Development

### Setup
1. npm install
  

### Testing
1. npm test

### Bundling
1. npm run-script pack
  * This project uses webpack for bundling.


### Todo:
1. Learn more about Live Lists and maybe incorporate a queryLive function in the future?


# Thanks!

---
_Source: https://npm.io/package/querybuddy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
