npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

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.

install

npm i fela-plugin-remove-undefined

Downloadsweekly downloads

606

version

5.0.21

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability