How to use the @mdx-js/util.startsWithCapitalLetter function in @mdx-js/util

To help you get started, we’ve selected a few @mdx-js/util 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 mdx-js / mdx / packages / babel-plugin-apply-mdx-type-props / index.js View on Github external
JSXOpeningElement(path) {
            const jsxName = path.node.name.name

            if (startsWithCapitalLetter(jsxName)) {
              componentNames.push(jsxName)

              path.node.attributes.push(
                t.jSXAttribute(
                  t.jSXIdentifier(`mdxType`),
                  t.stringLiteral(jsxName)
                )
              )
            }
          }
        }

@mdx-js/util

Deprecated: this package is no longer maintained.

MIT
Latest version published 2 months ago

Package Health Score

69 / 100
Full package analysis

Similar packages