How to use the react-docgen.utils.isReactModuleName function in react-docgen

To help you get started, we’ve selected a few react-docgen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github siddharthkp / react-docgen-external-proptypes-handler / index.js View on Github external
function isPropTypesExpression(path) {
  const moduleName = utils.resolveToModule(path);

  if (moduleName) {
    return (
      utils.isReactModuleName(moduleName) || moduleName === "ReactPropTypes"
    );
  }

  return false;
}
github doczjs / docz / core / docz-core / src / utils / docgen / externalProptypesHandler.ts View on Github external
function isPropTypesExpression(path: string) {
  const moduleName = utils.resolveToModule(path)

  if (moduleName) {
    return (
      utils.isReactModuleName(moduleName) || moduleName === 'ReactPropTypes'
    )
  }

  return false
}