<commit_before># This mixin grants the ability for views to specify a string
# as their template property.
#
# It assumes that there is a `views/templates` module object
# with the string as keys and templates as values.
#
# You can override the template path by passing in `templatePath`
# in the options.
define (require, exports) ->
  templatePath = ''

  # Precompiled templates function initializer.
  getTemplateFunction = ->
    template = @template
    if template
      tObj = require(templatePath)[template]
      if tObj
        tObj
      else
        errString = "The template file #{templatePath}/#{template} does not exist."
        throw new Error errString

  exports = (opts={}) ->
    # Reset between multiple calls.
    templatePath = opts.templatePath or 'views/templates'

    @getTemplateFunction = getTemplateFunction
    this<commit_msg>Fix long line in string-template<commit_after># This mixin grants the ability for views to specify a string
# as their template property.
#
# It assumes that there is a `views/templates` module object
# with the string as keys and templates as values.
#
# You can override the template path by passing in `templatePath`
# in the options.
define (require, exports) ->
  templatePath = ''

  # Precompiled templates function initializer.
  getTemplateFunction = ->
    template = @template
    if template
      tObj = require(templatePath)[template]
      if tObj
        tObj
      else
        errStr = "The template file #{templatePath}/#{template} doesn't exist."
        throw new Error errStr

  exports = (opts={}) ->
    # Reset between multiple calls.
    templatePath = opts.templatePath or 'views/templates'

    @getTemplateFunction = getTemplateFunction
    this
{'fraction_non_alphanumeric': 0.07834101382488479, 'fraction_numerical': 0.0, 'mean_word_length': 3.267813267813268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '649232', 'n_tokens_mistral': 450, 'n_tokens_neox': 442, 'n_words': 184}