 	toString: ->
 		"[object Stochator]"
 
-if module.exports
+if module?.exports
 	module.exports = Stochator
 else
 	this.Stochator = Stochator

	coefficient * numerator / denominator

shuffleSet = (set) ->
	set.sort(randomBoundedFloat).values

floatGenerator = (min, max, mean, stdev) ->
	if mean and stdev

			when "integer"
				integerGenerator(config.min, config.max)
			when "set"
				{ values, replacement, shuffle, weights } = config
				setGenerator(values, replacement, shuffle, weights)
			when "color", "rgb" then randomColor(config.kind)
			when "a-z", "A-Z" then randomCharacter(config.kind is "a-z")
		if not generator
			throw Error("#{ config.kind } not a recognized kind.")
		else
			generator

	createGenerators: (configs, mutator) ->
		configs[0] ?= {}
