rofrischmann/fela

View on GitHub
packages/fela-bindings/src/extractPassThroughProps.js

Summary

Maintainability
A
0 mins
Test Coverage
import { arrayReduce } from 'fast-loops'

export default function extractPassThroughProps(passThrough, ruleProps) {
  return arrayReduce(
    passThrough,
    (output, property) => {
      if (ruleProps.hasOwnProperty(property)) {
        output[property] = ruleProps[property]
      }

      return output
    },
    {}
  )
}