# rule-expander

> Expressive rule expander for use with Functional CSS

Latest version **1.0.0** (published 2015-12-19) · Unlicense license · 0 weekly downloads

## Install

```sh
npm install rule-expander
pnpm add rule-expander
yarn add rule-expander
bun add rule-expander
```

## 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 | 2015-12-19 |
| First published | 2015-12-19 |
| Weekly downloads | 0 |
| License | Unlicense |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joe Reeve |
| Maintainers | isnit0 |
| Keywords | CSS, functional, rule |

## Links

- npm: https://www.npmjs.com/package/rule-expander
- Repository: https://github.com/isnit0/rule-expander
- Homepage: https://github.com/isnit0/rule-expander#readme
- Issues: https://github.com/isnit0/rule-expander/issues
- npm.io page: https://npm.io/package/rule-expander

## 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.0 (latest) — 2015-12-19

## README

#CSS Rule Generator

###Installation
####Web
```javascript
<script type='text/javascript' src='https://rawgit.com/ISNIT0/rule-expander/master/index.js'></script>
```
####Node
```bash
npm i --save-dev rule-expander
```
###Usage
####Web
```javascript
var rule = '.u-${directions.char}-10 {${directions.dir}:10px;}';
var config = {
    directions: [{
        char: 'l',
        dir: 'left'
    }]
};

document.write(RuleExpander(rule, config));
```
####Node
```javascript
var RuleExpander = require('rule-expander');

var rule = '.u-${directions.char}-10 {${directions.dir}:10px;}';
var config = {
    directions: [{
        char: 'l',
        dir: 'left'
    }]
};

console.log(RuleExpander(rule, config));
```

####Gulp
https://github.com/ISNIT0/gulp-css-rule-expander

###Backgorund:
https://weblog.sh/~joe/generating-css-utilities-the-functional-way-NkyvaECHx

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