# rework-clone

> Clone module for Rework

Latest version **0.1.3** (published 2015-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install rework-clone
pnpm add rework-clone
yarn add rework-clone
bun add rework-clone
```

## 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.1.3 |
| Published | 2015-03-04 |
| First published | 2013-10-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | isqua |
| Maintainers | isquariel |
| Keywords | rework, css, clone, copy, inherit |

## Links

- npm: https://www.npmjs.com/package/rework-clone
- Repository: https://github.com/isqua/rework-clone
- Issues: https://github.com/isqua/rework-clone/issues
- npm.io page: https://npm.io/package/rework-clone

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

- 0.1.3 (latest) — 2015-03-04
- 0.1.2 — 2015-03-04
- 0.1.1 — 2015-03-04
- 0.1.0 — 2014-01-17
- 0.0.0 — 2013-10-15

## README

# rework-clone

[![NPM version][npm-image]][npm-link]
[![Build status][travis-image]][travis-link]
[![devDependency status][devdeps-image]][devdeps-link]
[![peerDependency status][peerdeps-image]][peerdeps-link]

This module clones properties from one rule set to another, unlike
[rework-inherit](https://github.com/reworkcss/rework-inherit) (rework.extend())
which concatenates the selectors.

Don’t copy anything and everything! Think when you need to inherit and when to
clone.

## Example

```css
.a {
  background: red
}
.b {
  clone: .a;
}
```

yields:

```css
.a {
  background: red;
}
.b {
  background: red;
}
```

## Usage

```js
var clone = require('rework-clone');

var css = rework(inputCSS)
  .use(clone(options))
  .toString();
```

### Options

This is only one option: `regexp` to replace.

```js
var css = rework(inputCSS)
  .use(clone({regexp: /^foo?$/}))
  .toString();
```

It will work with all `foo` properties.

## License

MIT

[npm-image]: https://img.shields.io/npm/v/rework-clone.svg?style=flat
[npm-link]: https://npmjs.org/package/rework-clone
[travis-image]: https://img.shields.io/travis/isqua/rework-clone.svg?style=flat
[travis-link]: https://travis-ci.org/isqua/rework-clone
[devdeps-image]: https://img.shields.io/david/dev/isqua/rework-clone.svg?style=flat
[devdeps-link]: https://david-dm.org/isqua/rework-clone#info=peerDependencies
[peerdeps-image]: https://img.shields.io/david/peer/isqua/rework-clone.svg?style=flat
[peerdeps-link]: https://david-dm.org/isqua/rework-clone#info=peerDependencies

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