<commit_before>( ($) ->
  ###*
  @name Local
  @namespace
  ###

  ###*
  Store an object in local storage.

  @name set
  @methodOf Local

  @param {String} key
  @param {Object} value
  @type Object
  @returns value
  ###
  store = (key, value) ->
    localStorage[key] = JSON.stringify(value)

    return value

  ###*
  Retrieve an object from local storage.

  @name get
  @methodOf Local

  @param {String} key
  @type Object
  @returns The object that was stored or undefined if no object was stored.
  ###
  retrieve = (key) ->
    value = localStorage[key]

    if value?
      JSON.parse(value)

  window.Local = $.extend window.Local,
    get: retrieve
    set: store
    put: store
    ###*
    Access an instance of Local with a specified prefix.

    @name new
    @methodOf Local

    @param {String} prefix
    @type Local
    @returns An interface to local storage with the given prefix applied.
    ###
    new: (prefix) ->
      prefix ||= ""

      get: (key) ->
        retrieve("#{prefix}_key")
      set: (key, value) ->
        store("#{prefix}_key", value)
      put: (key, value) ->
        store("#{prefix}_key", value)

)(jQuery)
<commit_msg>removing window and jQuery reference for exports<commit_after>( ->
  ###*
  @name Local
  @namespace
  ###

  ###*
  Store an object in local storage.

  @name set
  @methodOf Local

  @param {String} key
  @param {Object} value
  @type Object
  @returns value
  ###
  store = (key, value) ->
    localStorage[key] = JSON.stringify(value)

    return value

  ###*
  Retrieve an object from local storage.

  @name get
  @methodOf Local

  @param {String} key
  @type Object
  @returns The object that was stored or undefined if no object was stored.
  ###
  retrieve = (key) ->
    value = localStorage[key]

    if value?
      JSON.parse(value)

  # Export
  (exports ? this)["Local"] =
    get: retrieve
    set: store
    put: store
    ###*
    Access an instance of Local with a specified prefix.

    @name new
    @methodOf Local

    @param {String} prefix
    @type Local
    @returns An interface to local storage with the given prefix applied.
    ###
    new: (prefix) ->
      prefix ||= ""

      get: (key) ->
        retrieve("#{prefix}_key")
      set: (key, value) ->
        store("#{prefix}_key", value)
      put: (key, value) ->
        store("#{prefix}_key", value)

)()

{'fraction_non_alphanumeric': 0.1301775147928994, 'fraction_numerical': 0.0, 'mean_word_length': 2.445414847161572, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '4468453', 'n_tokens_mistral': 753, 'n_tokens_neox': 731, 'n_words': 247}