# dollar

> Web scraper with a jQuery like wrapper

Latest version **3.1.0** (published 2025-04-20) · Apache-2.0 license · 0 weekly downloads

## Install

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

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2025-04-20 |
| First published | 2013-04-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | pihvi |
| Keywords | scrape, $, jQuery, encoding, spider |

## Links

- npm: https://www.npmjs.com/package/dollar
- Repository: https://github.com/pihvi/dollar
- Homepage: https://github.com/pihvi/dollar#readme
- Issues: https://github.com/pihvi/dollar/issues
- npm.io page: https://npm.io/package/dollar

## Dependencies (3)

- [jsdom](https://npm.io/package/jsdom.md) 26.1.0
- [jquery](https://npm.io/package/jquery.md) 3.7.1
- [cheerio](https://npm.io/package/cheerio.md) 1.0.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 3.1.0 (latest) — 2025-04-20
- 3.0.1 — 2024-06-14
- 3.0.0 — 2024-06-14
- 2.0.1 — 2024-06-13
- 2.0.0 — 2024-06-13
- 1.0.0 — 2024-06-11
- 0.3.4 — 2018-03-11
- 0.3.3 — 2017-10-25
- 0.3.2 — 2017-10-25
- 0.3.1 — 2017-01-27
- 0.3.0 — 2016-08-21
- 0.2.0 — 2016-08-18
- 0.1.0 — 2014-03-30
- 0.0.8 — 2014-03-30
- 0.0.7 — 2014-03-29
- … 6 more at https://npm.io/package/dollar/versions

## README

Web scraper with a jQuery like wrapper.

## Usage ##
Uses Cheerio by default instead of jQuery for better performance.
```javascript
import dollar from 'dollar'

const $ = await dollar('https://www.wikipedia.org/')
console.log($('h1').text())
```

### Use real jQuery which is slower ###
```javascript
const $ = await dollar('https://www.wikipedia.org/', {jQuery: true})
console.log($('h1').text())
```

### Use given html ###
```javascript
const $ = await dollar({html: '<html><h1>hello</h1></html>'})
console.log($('h1').text())
```

### All parameters and defaults ###
```javascript
{
  jQuery: false,
  url: undefined, // or string
  html: undefined, // or string or Promise returning string
}
```

## License ##
Apache 2.0

## Changelog ##
### 3.1.0 - 2025-04-20 ###
- Update deps, Cheerio v1, jsdom v26

### 3.0.1 - 2024-06-14 ###
- Update docs

### 3.0.0 - 2024-06-14 ###
- Remove get from API
- Dollar call signature changed to take options also as 2nd parameter  

### 2.0.1 - 2024-06-13 ###
- Update docs

### 2.0.0 - 2024-06-13 ###
- Parameter names changed
- html parameter can be a Promise or a string

### 1.0.0 - 2024-06-11 ###
- Use ES6
- Remove Q and use native promises
- Remove lodash and use native functions
- Remove request and use fetch
- Remove encoding lib
- Upgrade rest i.e. jQuery, Cheerio and jsdom


### 0.3.3 - 2017-10-25 ###
- Upgrade jQuery to 3.2.1 and use it via npm

### 0.3.2 - 2017-10-25 ###
- Upgrade npm deps

### 0.3.1 - 2016-01-28 ###
- Upgrade npm deps

### 0.3.0 - 2016-08-21 ###
- Encoding support

### 0.2.0 - 2016-08-18 ###
- Upgrade jQuery from 2 to 3
- Upgrade npm deps

### 0.1.0 - 2014-03-30 ###
- something

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