# class-repeat

> Repeat class selectors

Latest version **1.0.2** (published 2017-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install class-repeat
pnpm add class-repeat
yarn add class-repeat
bun add class-repeat
```

## 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.2 |
| Published | 2017-11-06 |
| First published | 2016-03-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | css, selector, class, repeat |

## Links

- npm: https://www.npmjs.com/package/class-repeat
- Repository: https://github.com/johnotander/class-repeat
- Homepage: https://github.com/johnotander/class-repeat#readme
- Issues: https://github.com/johnotander/class-repeat/issues
- npm.io page: https://npm.io/package/class-repeat

## Dependencies (4)

- [is-present](https://npm.io/package/is-present.md) ^1.0.0
- [get-css-classes](https://npm.io/package/get-css-classes.md) ^1.1.0
- [has-class-selector](https://npm.io/package/has-class-selector.md) ^1.0.0
- [css-selector-tokenizer](https://npm.io/package/css-selector-tokenizer.md) ^0.5.4

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-11-06
- 1.0.1 — 2016-03-03
- 1.0.0 — 2016-03-03
- 0.1.0 — 2016-03-03

## README

# class-repeat [![Build Status](https://secure.travis-ci.org/johnotander/class-repeat.png?branch=master)](https://travis-ci.org/johnotander/class-repeat) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Repeat class selectors in a string, useful for getting around specificity woes when using utility classes in legacy projects.

## Installation

```bash
npm install --save class-repeat
```

## Usage

```javascript
var classRepeat = require('class-repeat')

classRepeat('.foo.bar') // => '.foo.foo.bar.bar'
classRepeat('.foo:before') // => '.foo.foo:before'
classRepeat('.foo .bar.baz') // => '.foo.foo .bar.bar.baz.baz'
classRepeat('input.foo-bar.baz > .pizazz') // => 'input.foo-bar.foo-bar.baz.baz > .pizazz.pizazz'
classRepeat('.foo', { repeat: 4 }) // => '.foo.foo.foo.foo'
```

## License

MIT

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Crafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).

***

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

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