• Jump To … +
    api.js attributes.js node-exports.js parser.js rule-attributes.js rule-dependencies.js sabnf-grammar.js scanner-callbacks.js scanner-grammar.js scanner.js semantic-callbacks.js show-rules.js syntax-callbacks.js web-exports.js converter.js node-exports.js transformers.js web-exports.js apg-conv.js help.js apg-exp.js exec.js flags.js parse-replacement.js replace-grammar.js replace.js result.js sabnf-generator.js split.js web-exports.js ast.js circular-buffer.js emitcss.js identifiers.js node-exports.js parser.js stats.js style.js trace.js utilities.js web-exports.js apg.js command-line.js LICENSE.md README.md index.md
  • web-exports.js

  • §
    /* eslint-disable no-undef */
    /*  *************************************************************************************
     *   copyright: Copyright (c) 2021 Lowell D. Thomas, all rights reserved
     *     license: BSD-2-Clause (https://opensource.org/licenses/BSD-2-Clause)
     *   ********************************************************************************* */
  • §

    This is the entry point for browserify to build the bundled version. The bundled version provides access to the

    • convert, encode and decode functions
    • transformers, the actual transformation functions
    • node.js Buffer global object
    (function webExports() {
      const { Buffer } = require('buffer');
      const converter = require('./converter');
      globalThis.apgConv = {
        convert: converter.convert,
        encode: converter.encode,
        decode: converter.decode,
        transformers: require('./transformers'),
  • §

    eslint-disable-next-line object-shorthand

        Buffer: Buffer,
      };
    })();