<commit_before>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
(function ( module ) {
  "use strict";

  // Search Constants
  var DEFAULT_SIZE = 10;

  // For Versioning
  var apiVersion = "@VERSION",
      makeAPI, Make, request;

  // Shim module so we can safely check what environment this is being included in.
  module = module || undefined;

  function doXHRServer( type, path, data, callback ) {
    if ( module ) {
      request({
        method: type,
        uri: path,
        json: data
      }, function( err, res, body ) {

        if ( err ) {
          callback( { error: err } );
          return;
        }

        if ( res.statusCode === 200 ) {
          callback( body );
        }
      });
    }
  }

  function doXHR( type, path, data, callback ) {

    if ( typeof data === "function" ) {<commit_msg>[#865390] Ensure MakeAPI is working when included client side and node/server side<commit_after>/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

// Shim module so we can safely check what environment this is being included in.
var module = module || undefined;

(function ( module ) {
  "use strict";

  // Search Constants
  var DEFAULT_SIZE = 10;

  // For Versioning
  var apiVersion = "@VERSION",
      makeAPI, Make, request;

  function doXHRServer( type, path, data, callback ) {
    if ( module ) {
      request({
        method: type,
        uri: path,
        json: data
      }, function( err, res, body ) {

        if ( err ) {
          callback( { error: err } );
          return;
        }

        if ( res.statusCode === 200 ) {
          callback( body );
        }
      });
    }
  }

  function doXHR( type, path, data, callback ) {

    if ( typeof data === "function" ) {
{'fraction_non_alphanumeric': 0.11470588235294117, 'fraction_numerical': 0.011764705882352941, 'mean_word_length': 2.0971168437025796, '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': '1164934', 'n_tokens_mistral': 625, 'n_tokens_neox': 586, 'n_words': 230}