Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fela-plugin-validator

Package Overview
Dependencies
Maintainers
1
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-plugin-validator

Fela plugin to validate style objects

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6K
decreased by-18.68%
Maintainers
1
Weekly downloads
 
Created
Source

fela-plugin-validator

npm downloads gzipped size

Logs invalid properties to the console. One might also enable automatic property deletion.

Installation

npm i --save fela-plugin-validator

Assuming you are using npm as your package mananger you can just npm install.
Otherwise we also provide a UMD. You can easily use it via npmcdn. It registers a FelaPluginValidator global.

<!-- Fela (Development): Unminified version including all warnings -->
<script src="https://npmcdn.com/fela-plugin-validator@1.0.1/dist/fela-plugin-validator.js"></script>
<!-- Fela (Production): Minified version -->
<script src="https://npmcdn.com/fela-plugin-validator@1.0.1/dist/fela-plugin-validator.min.js"></script>

Example

If the deleteInvalid option is enabled.

Input
{
  fontSize: undefined,
  color: 'red',
  padding: '20px undefined 0px'
}
Output
{
  color: 'red'
}

Configuration

The validator plugin uses two different option flags to enable/disable features.

import validator from 'fela-plugin-validator'

const plugin = validator({
  // Will log invalid properties as well as
  // the value assigned to, default: true
  logInvalid: true,
  // Will automatically delete invalid
  // properties, default: false
  deleteInvalid: true
})

License

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

Keywords

FAQs

Package last updated on 29 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc