evaluate-style
v1.0.0
Published
Evaluates dynamic inline styles
Downloads
10
Maintainers
Readme
Evaluate Style
Evaluates dynamic inline styles by passing data arguments to all defined functions.
Status
Installation
npm install evaluate-style
Usage
ES6
import evaluateStyle from 'evaluate-style';
const dynamicStyle = {foo: 'bar', bar: (data) => `${data.foobar}`};
const style = evaluateStyle(dynamicStyle, {foobar: 'test'});
CommonJS
var evaluateStyle = require('evaluate-style').default;
var dynamicStyle = {foo: 'bar', bar: (data) => `${data.foobar}`};
var style = evaluateStyle(dynamicStyle, {foobar: 'test'});