func logProgressFunc(c chan float64) func(call otto.FunctionCall) otto.Value {
	return func(call otto.FunctionCall) otto.Value {
		arg := call.Argument(0)
		if !arg.IsNumber() {
			return otto.UndefinedValue()
		}

		progress, _ := arg.ToFloat()
		progress = math.Min(math.Max(0, progress), 1)
		c <- progress

		return otto.UndefinedValue()
	}
}
// Progress logs the current progress value. The progress value should be
// between 0 and 1.0 inclusively, with 1 representing that the task is
// complete. Values outside of this range will be clamp to be within it.
Progress logs the current progress value. The progress value should be
between 0 and 1.0 inclusively, with 1 representing that the task is
complete. Values outside of this range will be clamp to be within it.
// Progress logs the current progress value . The progress value should be // between 0 and 1 . 0 inclusively with 1 representing that the task is // complete . Values outside of this range will be clamp to be within it .
func logProgressFunc(c chan float64) func(call otto.FunctionCall) otto.Value {
	return func(call otto.FunctionCall) otto.Value {
		arg := call.Argument(0)
		if !arg.IsNumber() {
			return otto.UndefinedValue()
		}
		progress, _ := arg.ToFloat()
		progress = math.Min(math.Max(0, progress), 1)
		c <- progress
		return otto.UndefinedValue()
	}
}
func logProgressFunc ( c chan float64 ) func ( call otto . FunctionCall ) otto . Value { return func ( call otto . FunctionCall ) otto . Value { arg := call . Argument ( 0 ) if ! arg . IsNumber ( ) { return otto . UndefinedValue ( ) } progress , _ := arg . ToFloat ( ) progress = math . Min ( math . Max ( 0 , progress ) , 1 ) c <- progress return otto . UndefinedValue ( ) } }
Progress logs the current progress value.
Progress logs the current progress value .