# parse-sel

> Parse hyperscript selector strings

Latest version **1.0.0** (published 2016-06-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install parse-sel
pnpm add parse-sel
yarn add parse-sel
bun add parse-sel
```

## 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.0.0 |
| Published | 2016-06-07 |
| First published | 2016-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | acstll |
| Maintainers | acstll |
| Keywords | hyperscript, virtual, dom, html |

## Links

- npm: https://www.npmjs.com/package/parse-sel
- Repository: https://github.com/acstll/parse-sel
- Homepage: https://github.com/acstll/parse-sel#readme
- Issues: https://github.com/acstll/parse-sel/issues
- npm.io page: https://npm.io/package/parse-sel

## Dependencies (1)

- [browser-split](https://npm.io/package/browser-split.md) 0.0.1

## 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

- 1.0.0 (latest) — 2016-06-07

## README

# parse-sel

A "parse selector" kind of utility function.

## Install

With [npm](http://npmjs.com) do:

```bash
npm install parse-sel --save
```

## Usage

This module exports a function that takes a string with a [`hyperscript` selector](https://github.com/dominictarr/hyperscript) and returns an object.

```js
const parseSelector = require('parse-sel')

parseSelector('div#foo.bar')
// =>
// {
//   tagName: 'div',
//   id: 'foo',
//   className: 'bar'
// }
  
```

You can pass `true` as a second argument and get the `tagName` uppercase.

## Credits

This is mainly lifted from the [virtual-dom](https://github.com/Matt-Esch/virtual-dom) module.
[https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/parse-tag.js](https://github.com/Matt-Esch/virtual-dom/blob/master/virtual-hyperscript/parse-tag.js)

There's also quite a few packages like this on [npm](http://npmjs.com).

## License

MIT

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