<commit_before>
/*
 *
 * poloniex-unofficial
 * https://git.io/polonode
 *
 * Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
 * exchange APIs.
 *
 * Copyright (c) 2016 <NAME>
 *
 * This software may be modified and distributed under the terms of the MIT
 * license. See the LICENSE file for details.
 *
 */

/*
 * Module IDs for API wrappers.
 */
const MOD_ID_WRAPPER_PUSH = "./api/push.js";
const MOD_ID_WRAPPER_PUBLIC = "./api/public.js";
const MOD_ID_WRAPPER_TRADING = "./api/trading.js";

/*
 * Legacy API selector function. Deprecated.
 */
exports.api = function(name, params) {
    // Module ID
    var modId;

    // Get module ID from wrapper name
    switch (name) {
    case "push":
        modId = MOD_ID_WRAPPER_PUSH;
        break;
    case "public":
        modId = MOD_ID_WRAPPER_PUBLIC;
        break;
    case "trading":
        modId = MOD_ID_WRAPPER_TRADING;
        break;
    }

    // Abort if module isn't available
    if (!modId) {
        return;
    }

    // Get the API wrapper constructor
    var wrapper = require(modId);

    // If params were supplied
    if (params) {
        // Instantiate wrapper with authentication parameters
        return new wrapper(params.key, params.secret);
    } else {
        // Instantiate wrapper without authentication parameters
        return new wrapper();
    }
};

/*
 * Push API wrapper constructor.
 */
exports.PushWrapper = require(MOD_ID_WRAPPER_PUSH);

/*
 * Public API wrapper constructor.
 */
exports.PublicWrapper = require(MOD_ID_WRAPPER_PUBLIC);

/*
 * Trading API wrapper constructor.
 */
exports.TradingWrapper = require(MOD_ID_WRAPPER_TRADING);
<commit_msg>Export OrderBook constructor<commit_after>
/*
 *
 * poloniex-unofficial
 * https://git.io/polonode
 *
 * Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
 * exchange APIs.
 *
 * Copyright (c) 2016 <NAME>
 *
 * This software may be modified and distributed under the terms of the MIT
 * license. See the LICENSE file for details.
 *
 */

/*
 * Module IDs for wrappers and utilities.
 */
const MOD_ID_WRAPPER_PUSH = "./api/push.js";
const MOD_ID_WRAPPER_PUBLIC = "./api/public.js";
const MOD_ID_WRAPPER_TRADING = "./api/trading.js";
const MOD_ID_UTIL_ORDER_BOOK = "./util/OrderBook.js";

/*
 * Legacy API selector function. Deprecated.
 */
exports.api = function(name, params) {
    // Module ID
    var modId;

    // Get module ID from wrapper name
    switch (name) {
    case "push":
        modId = MOD_ID_WRAPPER_PUSH;
        break;
    case "public":
        modId = MOD_ID_WRAPPER_PUBLIC;
        break;
    case "trading":
        modId = MOD_ID_WRAPPER_TRADING;
        break;
    }

    // Abort if module isn't available
    if (!modId) {
        return;
    }

    // Get the API wrapper constructor
    var wrapper = require(modId);

    // If params were supplied
    if (params) {
        // Instantiate wrapper with authentication parameters
        return new wrapper(params.key, params.secret);
    } else {
        // Instantiate wrapper without authentication parameters
        return new wrapper();
    }
};

/*
 * Push API wrapper constructor.
 */
exports.PushWrapper = require(MOD_ID_WRAPPER_PUSH);

/*
 * Public API wrapper constructor.
 */
exports.PublicWrapper = require(MOD_ID_WRAPPER_PUBLIC);

/*
 * Trading API wrapper constructor.
 */
exports.TradingWrapper = require(MOD_ID_WRAPPER_TRADING);

/*
 * Order book utility constructor.
 */
exports.OrderBook = require(MOD_ID_UTIL_ORDER_BOOK);

{'fraction_non_alphanumeric': 0.10458820176688516, 'fraction_numerical': 0.002279851809632374, 'mean_word_length': 2.7864077669902914, 'pattern_counts': {'":': 6, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3462498', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1084, 'n_words': 302}