fela-plugin-remove-undefined

5.0.21 • Public • Published

Deprecated!
The remove undefined plugin (fela-plugin-remove-undefined) is deprecated, please remove it from your Fela configuration.
Fela automatically removes 'undefined' values making this plugin obsolete.

fela-plugin-remove-undefined

npm version npm downloads

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.

Package Sidebar

Install

npm i fela-plugin-remove-undefined

Weekly Downloads

3

Version

5.0.21

License

MIT

Unpacked Size

5.81 kB

Total Files

10

Last publish

Collaborators

  • rofrischmann
  • txhawks