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 - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

4

package.json
{
"name": "fela-plugin-validator",
"version": "3.0.1",
"version": "3.0.2",
"description": "Fela plugin to validate style objects",

@@ -23,4 +23,4 @@ "main": "index.js",

"peerDependencies": {
"fela": "3.0.1"
"fela": "3.0.2"
}
}

@@ -18,7 +18,42 @@ # fela-plugin-validator

<!-- Fela (Development): Unminified version including all warnings -->
<script src="https://unpkg.com/fela-plugin-validator@3.0.1/dist/fela-plugin-validator.js"></script>
<script src="https://unpkg.com/fela-plugin-validator@3.0.2/dist/fela-plugin-validator.js"></script>
<!-- Fela (Production): Minified version -->
<script src="https://unpkg.com/fela-plugin-validator@3.0.1/dist/fela-plugin-validator.min.js"></script>
<script src="https://unpkg.com/fela-plugin-validator@3.0.2/dist/fela-plugin-validator.min.js"></script>
```
## Usage
Make sure to read the documentation on [how to use plugins](http://fela.js.org/docs/advanced/Plugins.html).
```javascript
import { createRenderer } from 'fela'
import unit from 'fela-plugin-validator'
const renderer = createRenderer({
plugins: [ validator() ]
})
```
### Configuration
##### Options
| Option | Value | Default | Description |
| --- | --- | --- | --- |
| `logInvalid` | *(boolean)* | `true` | logs invalid properties/values |
| `deleteInvalid` | *(boolean)* | `false` | deletes invalid properties/values |
##### Example
```javascript
import { createRenderer } from 'fela'
import validator from 'fela-plugin-validator'
const validatorPlugin = validator({
logInvalid: true,
deleteInvalid: true
})
const renderer = createRenderer({
plugins: [ validatorPlugin ]
})
```
## Example

@@ -75,19 +110,4 @@ If the `deleteInvalid` option is enabled.

```
## Configuration
The validator plugin uses two different option flags to enable/disable features.
```javascript
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

@@ -94,0 +114,0 @@ Fela is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br>

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