Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.01 KB

File metadata and controls

35 lines (26 loc) · 1.01 KB

bredon-plugin-remove-unit

npm version npm downloads

The remove-unit plugin will remove unnecessary units from dimensions.
It works for all units, not only pixel or length units.

Installation

yarn add bredon-plugin-remove-unit

You may alternatively use npm i --save bredon-plugin-remove-unit.

Usage

import { compile } from 'bredon'
import removeUnitPlugin from 'bredon-plugin-remove-unit'

const input = '15px 0px 5px 0px'

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

console.log(output)
// => 15px 0 5px 0

License

Bredon is licensed under the MIT License.
Documentation is licensed under Creative Common License.
Created with ♥ by @rofrischmann and all the great contributors.