Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
view-container / src / utils / hasInInheritanceChain.tsx
Size: Mime:
// @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
}