# pretty-selectors

> Pretty selectors take your ugly text and transform it to nice CSS selectors.

Latest version **1.2.4** (published 2016-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install pretty-selectors
pnpm add pretty-selectors
yarn add pretty-selectors
bun add pretty-selectors
```

## 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.2.4 |
| Published | 2016-03-04 |
| First published | 2014-10-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Petr Brzek |
| Maintainers | jankuca, marekhrabe, petrbrzek |

## Links

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

## Recent versions

- 1.2.4 (latest) — 2016-03-04
- 1.2.3 — 2015-04-22
- 1.2.2 — 2015-03-13
- 1.2.1 — 2015-03-13
- 1.2.0 — 2015-01-19
- 1.1.0 — 2014-12-08
- 1.0.0 — 2014-12-04
- 0.0.1 — 2014-10-06

## README

Pretty Selectors
================

> Pretty selectors take your ugly text and transform it to nice CSS selectors.

## Installation

`npm install pretty-selectors`

## Input/Output example

![](http://f.cl.ly/items/2H3O3y0z2t46042s0J1i/Screen%20Shot%202014-10-06%20at%2015.55.37.png)

## Code example

    var PrettySelectors = require('pretty-selectors');

    var selector = PrettySelectors('Moje mama', {separator: 'snake',
                                    selector: 'id',
                                    maxWords: 3});
    // result: #moje_mama

## Api

    PrettySelectors(text, object)

### text (string) – required

### object.separator (string, default: 'dash') – optional

Options: dash, snake, camel

### object.selector (string) – optional, default: 'class'

Options: class, id, element

### object.maxWords (number) – optional, default: 0 means no text stripping

### object.fallbackSelectorPrefix (string) – optional

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