<commit_before>/* vim:set ts=2 sw=2 sts=2 expandtab */
/*jshint asi: true undef: true es5: true node: true browser: true devel: true
         forin: true latedef: false globalstrict: true */

'use strict';

module.exports = function Box(description) {
  description = description || 'Boxed value'
  return function box(value) {
    return {
      isBoxed: true,
      is: box,
      value: value,
      description: description
    }
  }
}<commit_msg>Add comment docs for Box function<commit_after>/* vim:set ts=2 sw=2 sts=2 expandtab */
/*jshint asi: true undef: true es5: true node: true browser: true devel: true
         forin: true latedef: false globalstrict: true */

'use strict';

module.exports = function Box(description) {
  /**
  Create a "boxed" value.
  Boxed values may be used as flags to signify a mode or value.
  This is similar to the way some languages use magic constants to trigger
  a specific behavior or mode.

  Boxed values may have a description that explains how they are to be used.
  
  Returns a box object.
  **/
  description = description || 'Boxed value'
  return function box(value) {
    return {
      isBoxed: true,
      is: box,
      value: value,
      description: description
    }
  }
}
{'fraction_non_alphanumeric': 0.0931174089068826, 'fraction_numerical': 0.006477732793522267, 'mean_word_length': 3.012987012987013, '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': '4448293', 'n_tokens_mistral': 381, 'n_tokens_neox': 375, 'n_words': 150}