<commit_before>/** internal
 *  mixin Mime
 *
 *  An internal mixin whose public methods are exposed on the [[Environment]]
 *  and [[Index]] classes.
 *
 *  Provides helpers to deal with mime types.
 **/


'use strict';


// 3rd-party
var _ = require('underscore');
var mime = require('mime');


// internal
var getter = require('./common').getter;
var normalize = require('./common').normalizeExtension;


// get version of extensions to mimetype (and vice-vera) map
// that fits our needs
var generic_mime = new mime.Mime({
  defaultType:  mime.defult_type,
  loadBuiltins: true,
  normalize:    normalize
});


/**
 *  Mime#mimeTypes([ext]) -> String|Object
 *
 *  Returns a `Has` of registered mime types registered on the
 *  environment and those part of `mime` Node module.
 *
 *  If an `ext` is given, it will lookup the mime type for that extension.
 **/<commit_msg>Fix mime mixin<commit_after>/** internal
 *  mixin Mime
 *
 *  An internal mixin whose public methods are exposed on the [[Environment]]
 *  and [[Index]] classes.
 *
 *  Provides helpers to deal with mime types.
 **/


'use strict';


// 3rd-party
var _ = require('underscore');
var mime = require('mime');


// internal
var getter = require('./common').getter;


// get version of extensions to mimetype (and vice-vera) map
// that fits our needs
var generic_mime = new mime.Mime({
  loadBuiltins: true,
  defaultType:  mime.default_type,
  normalize:    require('./common').normalizeExtension
});


/**
 *  Mime#mimeTypes([ext]) -> String|Object
 *
 *  Returns a `Has` of registered mime types registered on the
 *  environment and those part of `mime` Node module.
 *
 *  If an `ext` is given, it will lookup the mime type for that extension.
 **/
{'fraction_non_alphanumeric': 0.12854661262304573, 'fraction_numerical': 0.0011580775911986102, 'mean_word_length': 3.5117493472584855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5279331', 'n_tokens_mistral': 560, 'n_tokens_neox': 532, 'n_words': 193}