npm.io
1.0.0 • Published 8 years ago

bredon-plugin-case

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
42

bredon-plugin-case

npm version npm downloads

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

Installation

yarn add bredon-plugin-case

You may alternatively use npm i --save bredon-plugin-case.

Usage

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
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.
Documentation is licensed under Creative Common License.
Created with by @rofrischmann and all the great contributors.

Keywords