1.0.0 • Published 6 years ago

bredon-plugin-case v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

bredon-plugin-case

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.

OptionsValueDefaultDescription
caselower, upperlowerThe 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.