<commit_before>var is = require('./is');
var typify = require('./typify');
var constructorOf = require('./constructor-of');

module.exports = function as(expected, value, ignoreCase, ...args) {
	var type = typify(expected, true);
	var fn = new RegExp('\\bFunction\\b', ignoreCase ? 'i' : undefined);
	if (constructorOf(value) === Function && !fn.test(type)) {
		value = value(...args);<commit_msg>chore: support 2 node5<commit_after>var is = require('./is');
var typify = require('./typify');
var constructorOf = require('./constructor-of');

module.exports = function as(expected, value, ignoreCase) {
	var type = typify(expected, true);
	var fn = new RegExp('\\bFunction\\b', ignoreCase ? 'i' : undefined);
	if (constructorOf(value) === Function && !fn.test(type)) {
		value = value.apply(null, Array.prototype.slice.call(arguments, 3));
{'fraction_non_alphanumeric': 0.19308700834326578, 'fraction_numerical': 0.003575685339690107, 'mean_word_length': 4.957446808510638, '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': '4504413', 'n_tokens_mistral': 263, 'n_tokens_neox': 258, 'n_words': 67}