refactor JsArrayBuffer