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

fela-utils

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-utils - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

4

es/processStyleWithPlugins.js
import arrayReduce from './arrayReduce';
export default function processStyleWithPlugins(renderer, style, type) {
var props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
if (renderer.plugins.length > 0) {
return arrayReduce(renderer.plugins, function (processedStyle, plugin) {
processedStyle = plugin(processedStyle, type, renderer);
processedStyle = plugin(processedStyle, type, renderer, props);
return processedStyle;

@@ -8,0 +10,0 @@ }, style);

@@ -15,5 +15,7 @@ 'use strict';

function processStyleWithPlugins(renderer, style, type) {
var props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
if (renderer.plugins.length > 0) {
return (0, _arrayReduce2.default)(renderer.plugins, function (processedStyle, plugin) {
processedStyle = plugin(processedStyle, type, renderer);
processedStyle = plugin(processedStyle, type, renderer, props);
return processedStyle;

@@ -20,0 +22,0 @@ }, style);

{
"name": "fela-utils",
"version": "5.0.0",
"version": "5.0.1",
"description": "Internal utilities for Fela",

@@ -26,4 +26,4 @@ "main": "lib/index.js",

"devDependencies": {
"fela": "^5.0.0"
"fela": "^5.0.1"
}
}

@@ -1,38 +0,6 @@

# fela-tools
# fela-utils
A set of useful tools to work with Fela.
fela-utils is a private utility package for Fela and should only be used interally.
<img alt="npm downloads" src="https://img.shields.io/npm/dm/fela-tools.svg"> <img alt="gzipped size" src="https://img.shields.io/badge/gzipped-0.53kb-brightgreen.svg">
## Installation
```sh
npm i --save fela-tools
```
Assuming you are using [npm](https://www.npmjs.com) as your package manager you can just `npm install`.<br>
Otherwise we also provide a [UMD](https://github.com/umdjs/umd). You can easily use it via [unpkg](https://unpkg.com/). It registers a `FelaTools` global.
```HTML
<!-- (Development) Unminified version -->
<script src="https://unpkg.com/fela-tools@4.3.5/dist/fela-tools.js"></script>
<!-- (Production) Minified version -->
<script src="https://unpkg.com/fela-tools@4.3.5/dist/fela-tools.min.js"></script>
```
## Usage
The provided API is provided by the `fela-tools` package by default e.g.
```javascript
import { StyleSheet } from 'fela-tools'
```
In addition to that, we also support per module imports to only import a specific tool *(which, without tree shaking, saves bundle size)*
```javascript
import StyleSheet from 'fela-tools/StyleSheet'
```
## API Reference
* [`mapValueToMediaQuery(queryValueMap, mapper)`](docs/mapValueToMediaQuery.md)
* [StyleSheet](docs/StyleSheet.md)
## License

@@ -39,0 +7,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