fela-plugin-remove-undefined
Removes any undefined
value or string values containing undefined
.
It also checks array values. This plugin has been used to ensure auto prefixing to work. It is not necessary anymore as Fela automatically strips all undefined values.
Installation
yarn add fela-plugin-remove-undefined
You may alternatively use npm i --save fela-plugin-remove-undefined
.
Usage
Make sure to read the documentation on how to use plugins.
import { createRenderer } from 'fela'
import removeUndefined from 'fela-plugin-remove-undefined'
const renderer = createRenderer({
plugins: [ removeUndefined() ]
})
Example
Input
{
color: 'blue',
fontSize: undefined,
border: 'undefinedpx solid blue',
':hover': {
color: [ 'rgba(0, 0, 0, 0.4)', undefined, 'black' ]
}
}
Output
{
color: 'blue',
':hover': {
color: [ 'rgba(0, 0, 0, 0.4)', 'black' ]
}
}
License
Fela is licensed under the MIT License.
Documentation is licensed under Creative Common License.
Created with ♥ by @rofrischmann and all the great contributors.