<commit_before>local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))

local Promise = require("Promise")

return function(parent, childName, timeOut)
	return Promise.new(function(fulfill, reject)
		local result = parent:WaitForChild(childName, timeOut)
		if result then
			fulfill(result)
		else
			reject("timed out")
		end
	end)
end<commit_msg>Make WaitForChildPromise function like a class<commit_after>local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))

local Promise = require("Promise")

local WaitForChildPromise = {}

function WaitForChildPromise.new(parent, childName, timeOut)
	timeOut = timeOut or 5

	return Promise.new(function(fulfill, reject)
		local result = parent:WaitForChild(childName, timeOut)
		if result then
			fulfill(result)
		else
			reject("timed out")
		end
	end)
end

return WaitForChildPromise
{'fraction_non_alphanumeric': 0.09944134078212291, 'fraction_numerical': 0.0011173184357541898, 'mean_word_length': 6.593220338983051, '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': '4725141', 'n_tokens_mistral': 285, 'n_tokens_neox': 268, 'n_words': 66}