<commit_before>const { Suite } = require('benchmark');
const datatypes = require('../../fixtures/datatypes.fixture').default;
const is = require('../../../source/modules/is');

datatypes.forEach((datatype) => {
	const suite = new Suite();

	suite.add(`is(${datatype.name})`, () => {
		return is(datatype.type, datatype.data);
	});

	suite.add(`Object.prototype.toString.call(${datatype.name})`, () => {
		return Object.prototype.toString.call(datatype.data) === datatype.seal;
	});

	suite.on('cycle', (evt) => {
		console.log(String(evt.target));
	});

	suite.on('complete', function () {
		console.log('\nFastest is', this.filter('fastest').map('name'), '\n');
	});

	suite.run();
});

<commit_msg>test: bench from is<commit_after>const { Suite } = require('benchmark');
const datatypes = require('../../fixtures/datatypes.fixture').default;
const is = require('../../../lib/is');

datatypes.forEach((datatype) => {
	const suite = new Suite();

	suite.add(`is(${datatype.name})`, () => {
		return is(datatype.type, datatype.data);
	});

	suite.add(`Object.prototype.toString.call(${datatype.name})`, () => {
		return Object.prototype.toString.call(datatype.data) === datatype.seal;
	});

	suite.on('cycle', (evt) => {
		console.log(String(evt.target));
	});

	suite.on('complete', function () {
		console.log('\nFastest is', this.filter('fastest').map('name'), '\n');
	});

	suite.run();
});


{'fraction_non_alphanumeric': 0.24659498207885305, 'fraction_numerical': 0.0, 'mean_word_length': 4.474509803921569, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2462205', 'n_tokens_mistral': 495, 'n_tokens_neox': 487, 'n_words': 67}