How to use the @mdx-js/util.isImportOrExport 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 / remark-mdx / index.js View on Github external
function tokenizeEsSyntax(eat, value) {
  const index = value.indexOf(EMPTY_NEWLINE)
  const subvalue = index !== -1 ? value.slice(0, index) : value

  if (isImportOrExport(subvalue)) {
    const nodes = extractImportsAndExports(subvalue, this.file)
    nodes.map(node => eat(node.value)(node))
  }
}
github mdx-js / mdx / packages / remark-mdx / index.js View on Github external
function tokenizeEsSyntaxLocator(value, _fromIndex) {
  return isImportOrExport(value) ? -1 : 1
}

@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