How to use the meriyah/package.json.homepage function in meriyah

To help you get started, we’ve selected a few meriyah 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 fkling / astexplorer / website / src / parsers / js / meriyah.js View on Github external
import React from 'react';
import defaultParserInterface from './utils/defaultESTreeParserInterface';
import pkg from 'meriyah/package.json';

const ID = pkg.name;

export default {
  ...defaultParserInterface,

  id: ID,
  displayName: ID,
  version: pkg.version,
  homepage: pkg.homepage,

  loadParser(callback) {
    require(['meriyah'], callback);
  },

  parse(parser, code, options) {
    return parser.parse(code, options);
  },

  nodeToRange(node) {
    if (typeof node.start === 'number') {
      return [node.start, node.end];
    }
  },

  getDefaultOptions() {
github fkling / astexplorer / website / src / parsers / js / meriyah.js View on Github external
renderSettings(parserSettings, onChange) {
    return (
      <div>
        <p>
          <a rel="noopener noreferrer" href="{pkg.homepage}">
            Option descriptions
          </a>
        </p>
        {defaultParserInterface.renderSettings.call(
          this,
          parserSettings,
          onChange,
        )}
      </div>
    );
  },
};

meriyah

A 100% compliant, self-hosted javascript parser with high focus on both performance and stability

ISC
Latest version published 15 days ago

Package Health Score

84 / 100
Full package analysis