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

fela-plugin-named-keys

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fela-plugin-named-keys - npm Package Compare versions

Comparing version 12.0.0-rc.2 to 12.0.0-rc.3.0

2

es/index.js

@@ -30,3 +30,3 @@ import isPlainObject from 'isobject';

export default function namedKeys(keys) {
return function (style, type, renderer) {
return function namedKeysPlugin(style, type, renderer) {
var props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};

@@ -33,0 +33,0 @@ return resolveNamedKeys(style, keys instanceof Function ? keys(props) : keys);

@@ -40,3 +40,3 @@ "use strict";

function namedKeys(keys) {
return function (style, type, renderer) {
return function namedKeysPlugin(style, type, renderer) {
var props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};

@@ -43,0 +43,0 @@ return resolveNamedKeys(style, keys instanceof Function ? keys(props) : keys);

{
"name": "fela-plugin-named-keys",
"version": "12.0.0-rc.2",
"version": "12.0.0-rc.3.0",
"description": "Fela plugin to replace named keys",

@@ -60,3 +60,3 @@ "main": "lib/index.js",

},
"gitHead": "0e5e638041a6a62e52128dbac21e9c5f21d80b66"
"gitHead": "71e887614179a10c85332e326cf1d943ca51289a"
}

@@ -11,11 +11,13 @@ # fela-plugin-named-keys

## Installation
```sh
yarn add fela-plugin-named-keys
```
You may alternatively use `npm i --save fela-plugin-named-keys`.
## Usage
Make sure to read the documentation on [how to use plugins](http://fela.js.org/docs/advanced/Plugins.html).
Make sure to read the documentation on [how to use plugins](https://fela.js.org/docs/latest/advanced/plugins#using-plugins).
```javascript

@@ -26,3 +28,3 @@ import { createRenderer } from 'fela'

const renderer = createRenderer({
plugins: [ namedKeys() ]
plugins: [namedKeys()],
})

@@ -32,8 +34,11 @@ ```

### Configuration
##### Parameters
| Parameter | Value | Default | Description |
| --- | --- | --- | --- |
| keyMap | *(Object)* | `{}` | An object with key-replacement pairs |
|  Parameter | Value | Default | Description |
| ---------- | ---------- | ------- | ------------------------------------ |
| keyMap | _(Object)_ |  `{}` | An object with key-replacement pairs |
##### Example
```javascript

@@ -47,7 +52,7 @@ import { createRenderer } from 'fela'

supportsFlex: '@supports (display: flex)',
supportsGrid: '@supports (display: grid)'
supportsGrid: '@supports (display: grid)',
})
const renderer = createRenderer({
plugins: [ namedKeysPlugin ]
plugins: [namedKeysPlugin],
})

@@ -57,5 +62,7 @@ ```

## Example
Using the above example code:
#### Input
```javascript

@@ -75,3 +82,5 @@ {

```
#### Output
```javascript

@@ -93,4 +102,5 @@ {

## License
Fela is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br>
Documentation is licensed under [Creative Commons License](http://creativecommons.org/licenses/by/4.0/).<br>
Created with ♥ by [@robinweser](http://weser.io) and all the great contributors.
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