<commit_before>_ = require 'underscore'


beforeOnce = (fn) ->
  _.once(beforeEach fn)


mixins =
  default: ->
    foo: 'bar'
    bar: 1
    baz: ->
      [@foo]

  schematized: ->
    schema: [
      'expected_key_1'
      'expected_key_2'
    ]

  postextend: ->
    unless _.isNumber @expected_key_1
      throw new TypeError 'Expected @expected_key_1 to be a number'
    unless _.isString @expected_key_2
      throw new TypeError 'Expected @expected_key_2 to be a String'

  postinclude: ->
    unless Array.isArray @expected_key_1
      throw new TypeError 'Expected @expected_key_1 to be an Array'

module.exports = {beforeOnce, _, mixins}<commit_msg>fix beforeOnce<commit_after>_ = require 'underscore'


beforeOnce = (fn) ->
  beforeEach _.once(fn)


mixins =
  default: ->
    foo: 'bar'
    bar: 1
    baz: ->
      [@foo]

  schematized: ->
    schema: [
      'expected_key_1'
      'expected_key_2'
    ]

  postextend: ->
    unless _.isNumber @expected_key_1
      throw new TypeError 'Expected @expected_key_1 to be a number'
    unless _.isString @expected_key_2
      throw new TypeError 'Expected @expected_key_2 to be a String'

  postinclude: ->
    unless Array.isArray @expected_key_1
      throw new TypeError 'Expected @expected_key_1 to be an Array'

module.exports = {beforeOnce, _, mixins}
{'fraction_non_alphanumeric': 0.09855951478392722, 'fraction_numerical': 0.013646702047005308, 'mean_word_length': 2.8823529411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '7288234', 'n_tokens_mistral': 455, 'n_tokens_neox': 437, 'n_words': 120}