bredon-plugin-case

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i bredon-plugin-case

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • rofrischmann