# doc-js

> A small, simple, and fast DOM helper library

Latest version **1.3.1** (published 2015-08-31) · 0 weekly downloads

## Install

```sh
npm install doc-js
pnpm add doc-js
yarn add doc-js
bun add doc-js
```

## 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 | 1.3.1 |
| Published | 2015-08-31 |
| First published | 2013-04-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Kory Nunn |
| Maintainers | korynunn |

## Links

- npm: https://www.npmjs.com/package/doc-js
- Repository: https://github.com/KoryNunn/doc
- Homepage: https://github.com/KoryNunn/doc#readme
- Issues: http://github.com/KoryNunn/doc/issues
- npm.io page: https://npm.io/package/doc-js

## Recent versions

- 1.3.1 (latest) — 2015-08-31
- 1.3.0 — 2015-08-03
- 1.2.0 — 2015-03-19
- 1.1.13 — 2015-01-20
- 1.1.12 — 2014-11-26
- 1.1.11 — 2014-11-26
- 1.1.10 — 2014-11-26
- 1.1.9 — 2014-11-26
- 1.1.8 — 2014-11-26
- 1.1.7 — 2014-11-19
- 1.1.6 — 2014-10-18
- 1.1.5 — 2014-10-18
- 1.1.4 — 2014-10-10
- 1.1.3 — 2014-10-09
- 1.1.2 — 2014-10-09
- … 27 more at https://npm.io/package/doc-js/versions

## README

# doc

# What #

a small, simple, and fast DOM helper library

# Why? #

A few commonly used dom traverstal and event binding techniques are not easy to write in pure DOM, this provides a simple way to do them.

# Usage #

doc can be used very much like jQuery:

    var doc = require('doc-js');

    doc(target); // NodeList

where 'target' can be a CSS selector, a HTMLElement, or a list of elements, eg:

    doc('.things'); // List of nodes that have the class 'things'


There are two versions of every function; a legacy way, and a fluent way.

Legacy way example:

    doc.is(target, selector);

Fluent way example:

    doc(target).is(selector);

# Goals #

## Easy to use ##

## Tiny ##

~~less than 1k minified~~

about 1.3k min'd and gzipped (I added features..)

## Fast ##

http://jsperf.com/doc-vs-jquery/8

## Browser support

Works in browsers.

Also works in IE >= 8 when you include a polyfill script in your page, like this one: 

```html
    <script src="//cdn.polyfill.io/v1/polyfill.min.js"></script>
```

# License #

MIT

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