UNPKG

styled-components

Version:

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

16 lines (11 loc) • 258 B
// @flow export default function hasInInheritanceChain(child: any, parent: Function) { let target = child while (target) { target = Object.getPrototypeOf(target) if (target && target === parent) { return true } } return false }