https://github.com/nikordaris/evaluate-style
  
  
    Evaluates dynamic inline styles 
    https://github.com/nikordaris/evaluate-style
  
        Last synced: 8 months ago 
        JSON representation
    
Evaluates dynamic inline styles
- Host: GitHub
- URL: https://github.com/nikordaris/evaluate-style
- Owner: nikordaris
- License: mit
- Created: 2017-02-07T18:30:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-24T00:25:36.000Z (over 8 years ago)
- Last Synced: 2024-10-19T11:28:27.167Z (about 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- 
            Metadata Files:
            - Readme: README.md
- License: LICENSE
 
Awesome Lists containing this project
README
          Evaluate Style
--------------
Evaluates dynamic inline styles by passing data arguments to all defined functions.
## Status
[](https://opensource.org/licenses/MIT)
[](http://travis-ci.org/nharris85/evaluate-style)
[](https://www.npmjs.com/package/evaluate-style)
[](https://david-dm.org/nharris85/evaluate-style)
[](https://david-dm.org/nharris85/evaluate-style#info=devDependencies)
## Installation
```bash
npm install evaluate-style
```
## Usage
**ES6**
```js
import evaluateStyle from 'evaluate-style';
const dynamicStyle = {foo: 'bar', bar: (data) => `${data.foobar}`};
const style = evaluateStyle(dynamicStyle, {foobar: 'test'});
```
**CommonJS**
```js
var evaluateStyle = require('evaluate-style').default;
var dynamicStyle = {foo: 'bar', bar: (data) => `${data.foobar}`};
var style = evaluateStyle(dynamicStyle, {foobar: 'test'});
```