# jshit

> The last library for dirty DOM manipulations if you can avoid that.

Latest version **0.0.1** (published 2015-10-28) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2015-10-28 |
| First published | 2015-10-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kchan |

## Links

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

## Recent versions

- 0.0.1 (latest) — 2015-10-28

## README

# jShit

🚧 WIP. The last library for dirty DOM manipulations if you can avoid that.

## Install

First:

```bash
npm install jshit --save
```

Then:

```javascript
// using CommonJS and Webpack with babel-loader
import { $, $$, dom } from 'jshit'

// loaded directly from CDN
// $/$$/dom ... will be automatically exposed as global vars.
```

## API

### Selector

```javascript
// for a single dom element
$('elmement')

// for a dom array
$$('elemements')

// remember that $/$$ is just a shorthand
// for document.querySelector/querySelectorAll
```

### Search

```javascript
// .find is a short hand for querySelectors in its parent element
// it works for `dom` function set globally by jShit
var el = dom($('element'))
el.find('li')
// return something like : DOM {el: NodeList[5]}
// which is your `li` array
```

## Loop

```javascript
// if you got a dom array using $$
// for using dom.find() method
// you can iterate over each dom element
var els = dom($('element')).find('li')
els.each(function (el, index) {
  console.log(el, index)
})
```

## License

MIT.

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