# tiny-element

> A tiny DOM element selector

Latest version **1.1.0** (published 2014-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiny-element
pnpm add tiny-element
yarn add tiny-element
bun add tiny-element
```

## 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.1.0 |
| Published | 2014-09-23 |
| First published | 2014-01-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Scott Corgan |
| Maintainers | scottcorgan |
| Keywords | tiny, element, selector, DOM, dom, query, css |

## Links

- npm: https://www.npmjs.com/package/tiny-element
- Repository: https://github.com/scottcorgan/tiny-element
- Issues: https://github.com/scottcorgan/tiny-element/issues
- npm.io page: https://npm.io/package/tiny-element

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2014-09-23
- 1.0.0 — 2014-09-16
- 0.1.4 — 2014-03-13
- 0.1.3 — 2014-01-06
- 0.1.2 — 2014-01-06
- 0.1.1 — 2014-01-06
- 0.1.0 — 2014-01-06

## README

# tiny-element
 
A tiny DOM element selector

[![browser support](https://ci.testling.com/scottcorgan/tiny-element.png)](https://ci.testling.com/scottcorgan/tiny-element)
 
## Install

NPM

```
npm install tiny-element --save
```

Bower

```
bower install tiny-element --save
```

```html
<script src="bower_components/tiny-element/dist/tinyelement.js"></script>
```

## Usage

Browser

```js
var element = window.tinyElement;

var el = element('.parent .some-selector');
var els = element('.some-elements', true); // This returns an ACTUAL array of DOM elements
```

Browserify

```js
var element = require('tiny-element');

var el = element('.parent .some-selector');
var els = element('.some-elements', true); // This returns an ACTUAL array of DOM elements
```

### element(selector[, multiple])

* `selector` - a css selector OR DOM element. If a DOM element is passed in, it just returns that DOM element. It's a nice abstraction to avoid always testing for a selector or DOM element.
* `multiple` - should the query return multiple DOM elements. This is useful because it returns an actual array or DOM elements instead of a pseudo-array.
 
## Run Tests
 
Requires [Phantomjs](phantomjs.org/download.html) is installed
 
```
npm install
npm test
```

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