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

To help you get started, we’ve selected a few webidl2 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 / webidl / webidl2.js View on Github external
import defaultParserInterface from '../utils/defaultParserInterface';
import pkg from 'webidl2/package.json';

const ID = 'webidl2';

export default {
  ...defaultParserInterface,

  id: ID,
  displayName: ID,
  version: pkg.version,
  homepage: pkg.homepage || 'https://github.com/w3c/webidl2.js',
  typeProps: new Set(['name', 'type', 'idlType', 'escapedName']),

  getNodeName(node) {
    if (node.name) {
        return node.name + (node.optional ? '?' : '');
    } else if (node.type) {
        return node.type;
    } else if (node.idlType) {
        return node.idlType.idlType || node.idlType;
    }
  },

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

webidl2

A WebIDL Parser

MIT
Latest version published 1 year ago

Package Health Score

65 / 100
Full package analysis

Similar packages