<commit_before>import Shape from 'kittik-shape-basic';
import {js_beautify as beautify} from 'js-beautify';
import {highlight} from 'cardinal';

/**
 * Implements Code shape which renders the highlighted code at specified point.
 *
 * @since 1.0.0
 * @extends {Shape}
 */
export default class Code extends Shape {
  /**
   * Create Code shape.
   *
   * @constructor
   * @param {Cursor} cursor Cursor instance
   * @param {Object} [options] Options object
   * @example
   * Code.create(cursor, {
   *   code: 'console.log('Your code here');'
   * });
   */
  constructor(cursor, options = {}) {
    super(cursor, options);

    this.setCode(options.code);
  }

  /**
   * Get current code from shape.
   *
   * @returns {String}
   */
  getCode() {
    return this.get('code');
  }

  /**
   * Set new code to this shape.<commit_msg>docs(shape): Update comments in Code shape<commit_after>import Shape from 'kittik-shape-basic';
import {js_beautify as beautify} from 'js-beautify';
import {highlight} from 'cardinal';

/**
 * Implements Code shape which renders the highlighted code at specified point.
 *
 * @since 1.0.0
 * @extends {Shape}
 */
export default class Code extends Shape {
  /**
   * Create Code shape.
   *
   * @constructor
   * @param {Cursor} cursor Cursor instance
   * @param {Object} [options] Options object
   * @param {String} [options.code] Code fragment that you want to show
   * @example
   * Code.create(cursor, {
   *   code: 'console.log('Your code here');'
   * });
   */
  constructor(cursor, options = {}) {
    super(cursor, options);

    this.setCode(options.code);
  }

  /**
   * Get current code from shape.
   *
   * @returns {String}
   */
  getCode() {
    return this.get('code');
  }

  /**
   * Set new code to this shape.
{'fraction_non_alphanumeric': 0.1422924901185771, 'fraction_numerical': 0.0033879164313946925, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2425032', 'n_tokens_mistral': 578, 'n_tokens_neox': 563, 'n_words': 166}