# bredon-plugin-case

> Bredon plugin to normalize case

Latest version **1.0.0** (published 2017-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install bredon-plugin-case
pnpm add bredon-plugin-case
yarn add bredon-plugin-case
bun add bredon-plugin-case
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-11-15 |
| First published | 2017-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 42 |
| Author | Robin Frischmann |
| Maintainers | rofrischmann |
| Keywords | css, parser, css-parser, css-value-parser, ast, lexer, tokenizer, cssinjs, bredon |

## Links

- npm: https://www.npmjs.com/package/bredon-plugin-case
- Repository: https://github.com/rofrischmann/bredon
- Homepage: https://github.com/rofrischmann/bredon#readme
- Issues: https://github.com/rofrischmann/bredon/issues
- npm.io page: https://npm.io/package/bredon-plugin-case

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-11-15

## README

# bredon-plugin-case

<img alt="npm version" src="https://badge.fury.io/js/bredon-plugin-case.svg"> <img alt="npm downloads" src="https://img.shields.io/npm/dm/bredon-plugin-case.svg">

The case plugin normalizes the letter case for all identifier, hex color values, assigment names and units.<br>
It can either use lower-case or upper-case.

## Installation
```sh
yarn add bredon-plugin-case
```
You may alternatively use `npm i --save bredon-plugin-case`.

## Usage

```javascript
import { compile } from 'bredon'
import casePlugin from 'bredon-plugin-case'

const input = '1px SOLID AliceBlue'

const output = compile(input, {
  plugins: [ 
    casePlugin()
  ]
})

console.log(output)
// => 1px solid aliceblue
```

### Configuration
By default the plugin converts to lower-case.

| Options | Value | Default | Description |
| ------- | ----- | ------- | ----------- |
| case  | `lower`, `upper` | `lower` | The prefered case |

```javascript
import { compile } from 'bredon'
import casePlugin from 'bredon-plugin-case'

const input = '1px SOLID AliceBlue'

const output = compile(input, {
  plugins: [ 
    casePlugin({
      case: 'upper'
    })
  ]
})

console.log(output)
// => 1PX SOLID ALICEBLUE
```

## License
Bredon is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br>
Documentation is licensed under [Creative Common License](http://creativecommons.org/licenses/by/4.0/).<br>
Created with ♥ by [@rofrischmann](http://rofrischmann.de) and all the great contributors.

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