func EncoderEncodeIntoResultFromJS(value js.Wrapper) *EncoderEncodeIntoResult {
	input := value.JSValue()
	var out EncoderEncodeIntoResult
	var (
		value0 int  
		value1 int  
	)
	value0 = (input.Get("read")).Int()
	out.Read = value0
	value1 = (input.Get("written")).Int()
	out.Written = value1
	return &out
}
EncoderEncodeIntoResultFromJS is allocating a new
EncoderEncodeIntoResult object and copy all values from
input javascript object
package text
import js "github.com/gowebapi/webapi/core/js"
import (
	"github.com/gowebapi/webapi/javascript"
	"github.com/gowebapi/webapi/javascript/missingtypes"
	"github.com/gowebapi/webapi/patch"
)
func unused(value interface{}) {
}
type Union struct {
	Value js.Value
}
func (u *Union) JSValue() js.Value {
	return u.Value
}
func UnionFromJS(value js.Value) *Union {
	return &Union{Value: value}
}
type DecodeOptions struct {
	Stream bool
}
func (_this *DecodeOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Stream
	out.Set("stream", value0)
	return out
}
func DecodeOptionsFromJS(value js.Wrapper) *DecodeOptions {
	input := value.JSValue()
	var out DecodeOptions
	var (
		value0 bool  
	)
	value0 = (input.Get("stream")).Bool()
	out.Stream = value0
	return &out
}
type DecoderOptions struct {
	Fatal     bool
	IgnoreBOM bool
}
func (_this *DecoderOptions) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Fatal
	out.Set("fatal", value0)
	value1 := _this.IgnoreBOM
	out.Set("ignoreBOM", value1)
	return out
}
func DecoderOptionsFromJS(value js.Wrapper) *DecoderOptions {
	input := value.JSValue()
	var out DecoderOptions
	var (
		value0 bool  
		value1 bool  
	)
	value0 = (input.Get("fatal")).Bool()
	out.Fatal = value0
	value1 = (input.Get("ignoreBOM")).Bool()
	out.IgnoreBOM = value1
	return &out
}
type EncoderEncodeIntoResult struct {
	Read    int
	Written int
}
func (_this *EncoderEncodeIntoResult) JSValue() js.Value {
	out := js.Global().Get("Object").New()
	value0 := _this.Read
	out.Set("read", value0)
	value1 := _this.Written
	out.Set("written", value1)
	return out
}