<commit_before>'use strict';

/*!
 * Collection
 * https://github.com/kobezzza/Collection
 *
 * Released under the MIT license
 * https://github.com/kobezzza/Collection/blob/master/LICENSE
 */

import { IGNORE, FALSE } from '../consts/links';

export const asyncTypes = {
	'stream': true,
	'isIDBRequest': true
};

export const mapSet = {
	'map': true,
	'set': true
};

export const weakTypes = {
	'weakMap': true,
	'weakSet': true
};

export const iterators = {
	'iterator': true,
	'asyncIterator': true,
	'generator': true,
	'stream': true,
	'idbRequest': true
};

export const
	Empty = {};

/**
 * Returns true if the specified value is a function
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isFunction(obj) {
	return typeof obj === 'function';
}

/**
 * Returns true if the specified value is a number
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isNumber(obj) {
	return typeof obj === 'number';
}

/**
 * Returns true if the specified value is a string
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isString(obj) {
	return typeof obj === 'string';
}

/**
 * Returns true if the specified value is a boolean
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isBoolean(obj) {
	return typeof obj === 'boolean';
}

/**
 * Returns true if the specified value is an array
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isArray(obj) {
	return Array.isArray(obj) || obj instanceof Array;
}

/**
 * Returns true if the specified value is a Map instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isMap(obj) {
	return typeof Map === 'function' && obj instanceof Map;
}

/**
 * Returns true if the specified value is a WeakMap instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isWeakMap(obj) {
	return typeof WeakMap === 'function' && obj instanceof WeakMap;
}

/**
 * Returns true if the specified value is a Set instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isSet(obj) {
	return typeof Set === 'function' && obj instanceof Set;
}

/**
 * Returns true if the specified value is a WeakSet instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isWeakSet(obj) {
	return typeof WeakSet === 'function' && obj instanceof WeakSet;
}

/**
 * Returns true if the specified value is a Promise instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isPromise(obj) {
	return typeof Promise === 'function' && obj instanceof Promise;
}

/**
 * Returns true if the specified value is a plain object
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isPlainObject(obj) {
	return Boolean(obj) && obj.constructor === Object;
}

const objectTypes = {
	'object': true,
	'function': true<commit_msg>Fixed isPromise()<commit_after>'use strict';

/*!
 * Collection
 * https://github.com/kobezzza/Collection
 *
 * Released under the MIT license
 * https://github.com/kobezzza/Collection/blob/master/LICENSE
 */

import { IGNORE, FALSE } from '../consts/links';

export const asyncTypes = {
	'stream': true,
	'isIDBRequest': true
};

export const mapSet = {
	'map': true,
	'set': true
};

export const weakTypes = {
	'weakMap': true,
	'weakSet': true
};

export const iterators = {
	'iterator': true,
	'asyncIterator': true,
	'generator': true,
	'stream': true,
	'idbRequest': true
};

export const
	Empty = {};

/**
 * Returns true if the specified value is a function
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isFunction(obj) {
	return typeof obj === 'function';
}

/**
 * Returns true if the specified value is a number
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isNumber(obj) {
	return typeof obj === 'number';
}

/**
 * Returns true if the specified value is a string
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isString(obj) {
	return typeof obj === 'string';
}

/**
 * Returns true if the specified value is a boolean
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isBoolean(obj) {
	return typeof obj === 'boolean';
}

/**
 * Returns true if the specified value is an array
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isArray(obj) {
	return Array.isArray(obj) || obj instanceof Array;
}

/**
 * Returns true if the specified value is a Map instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isMap(obj) {
	return typeof Map === 'function' && obj instanceof Map;
}

/**
 * Returns true if the specified value is a WeakMap instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isWeakMap(obj) {
	return typeof WeakMap === 'function' && obj instanceof WeakMap;
}

/**
 * Returns true if the specified value is a Set instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isSet(obj) {
	return typeof Set === 'function' && obj instanceof Set;
}

/**
 * Returns true if the specified value is a WeakSet instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isWeakSet(obj) {
	return typeof WeakSet === 'function' && obj instanceof WeakSet;
}

/**
 * Returns true if the specified value is a Promise instance
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isPromise(obj) {
	return Boolean(obj && isFunction(obj.then) && isFunction(obj.catch));
}

/**
 * Returns true if the specified value is a plain object
 *
 * @param {?} obj - source value
 * @return {boolean}
 */
export function isPlainObject(obj) {
	return Boolean(obj) && obj.constructor === Object;
}

const objectTypes = {
	'object': true,
	'function': true
{'fraction_non_alphanumeric': 0.14448993517570796, 'fraction_numerical': 0.0, 'mean_word_length': 3.634782608695652, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '879021', 'n_tokens_mistral': 1824, 'n_tokens_neox': 1811, 'n_words': 641}