<commit_before>const Element = require('extrajs-dom').Element
const View = require('extrajs-view')

/**
 * Static members for the Xmeter package.
 * @namespace
 */
class Xmeter {
  /** @private */ constructor() {}

  /**
   * @summary Render any data in HTML.
   * @see Xmeter.VIEW
   * @param   {*} data any data to render
   * @returns {View}
   */
  static view(data) {
    /**
     * @summary This view object is a set of functions returning HTML output.
     * @description Available displays:
     * - `Xmeter.view(data).permalink()` - display a permalink
     * @namespace Xmeter.VIEW
     * @type {View}
     */
    return new View(null, data)
      /**
       * Return an `<a.Permlink>` element.
       * @summary Call `Xmeter.view(data).permalink()` to render this display.
       * @function Xmeter.VIEW.permalink
       * @version STABLE
       * @param   {string=} content the text of the link
       * @param   {string=} label the value for `[aria-label]` attribute
       * @returns {string} HTML output
       */
      .addDisplay(function permalink(content = '&sect;', label = 'permalink') {
        return new Element('a').class('c-Permalink h-Inline h-Hidden')
          .attr({ href: `#${this.id}`, 'aria-label': label })
          .addContent(content)
          .html()
      })
  }
}

module.exports = Xmeter<commit_msg>suppress xjs.Element argument warning<commit_after>const HTMLElement = require('extrajs-dom').HTMLElement
const View = require('extrajs-view')

/**
 * Static members for the Xmeter package.
 * @namespace
 */
class Xmeter {
  /** @private */ constructor() {}

  /**
   * @summary Render any data in HTML.
   * @see Xmeter.VIEW
   * @param   {*} data any data to render
   * @returns {View}
   */
  static view(data) {
    /**
     * @summary This view object is a set of functions returning HTML output.
     * @description Available displays:
     * - `Xmeter.view(data).permalink()` - display a permalink
     * @namespace Xmeter.VIEW
     * @type {View}
     */
    return new View(null, data)
      /**
       * Return an `<a.Permlink>` element.
       * Parameter `data` should be of type `{id:string}` (an object with a string `id` property).
       * @summary Call `Xmeter.view(data).permalink()` to render this display.
       * @function Xmeter.VIEW.permalink
       * @version STABLE
       * @param   {string=} content the text of the link
       * @param   {string=} label the value for `[aria-label]` attribute
       * @returns {string} HTML output
       */
      .addDisplay(function permalink(content = '&sect;', label = 'permalink') {
        return new HTMLElement('a').class('c-Permalink h-Inline h-Hidden')
          .attr({ href: `#${this.id}`, 'aria-label': label })
          .addContent(content)
          .html()
      })
  }
}

module.exports = Xmeter
{'fraction_non_alphanumeric': 0.1433132316424264, 'fraction_numerical': 0.0, 'mean_word_length': 2.5338345864661656, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3670584', 'n_tokens_mistral': 888, 'n_tokens_neox': 865, 'n_words': 248}