<commit_before>/**
 * A geocoder component using Mapbox Geocoding APi
 * @class mapboxgl.Geocoder
 *
 * @param {Object} options
 * @param {String} [options.position="top-right"] A string indicating the control's position on the map. Options are `top-right`, `top-left`, `bottom-right`, `bottom-left`
 * @param {String} [options.accessToken=null] Required unless `mapboxgl.accessToken` is set globally
 * @param {string|element} options.container html element to initialize the map in (or element id as string). if no container is passed map.getcontainer() is used instead.
 * @param {Array<Array<number>>} options.proximity If set, search results closer to these coordinates will be given higher priority.
 * @example
 * var geocoder = Geocoder({
 *   container: 'map'
 * });
 *
 * map.addControl(directions);
 * @return {Geocoder} `this`
 */
import Geocoder from './src/geocoder';

function exportFn(options) {
  return new Geocoder(options);
}

if (window.mapboxgl) {
  mapboxgl.Geocoder = exportFn;
} else if (typeof module !== 'undefined') {
  module.exports = exportFn;
}<commit_msg>Export as class and remove factory method<commit_after>/**
 * A geocoder component using Mapbox Geocoding APi
 * @class mapboxgl.Geocoder
 *
 * @param {Object} options
 * @param {String} [options.position="top-right"] A string indicating the control's position on the map. Options are `top-right`, `top-left`, `bottom-right`, `bottom-left`
 * @param {String} [options.accessToken=null] Required unless `mapboxgl.accessToken` is set globally
 * @param {string|element} options.container html element to initialize the map in (or element id as string). if no container is passed map.getcontainer() is used instead.
 * @param {Array<Array<number>>} options.proximity If set, search results closer to these coordinates will be given higher priority.
 * @example
 * var geocoder = Geocoder({
 *   container: 'map'
 * });
 *
 * map.addControl(directions);
 * @return {Geocoder} `this`
 */
import Geocoder from './src/geocoder';

if (window.mapboxgl) {
  mapboxgl.Geocoder = Geocoder;
} else if (typeof module !== 'undefined') {
  module.exports = Geocoder;
}
{'fraction_non_alphanumeric': 0.12663551401869158, 'fraction_numerical': 0.0, 'mean_word_length': 4.77088948787062, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1098999', 'n_tokens_mistral': 646, 'n_tokens_neox': 640, 'n_words': 221}