5#ifndef MOLYBDEN_JS_ARRAY_HPP
6#define MOLYBDEN_JS_ARRAY_HPP
8#include "molybden/js/js_object.hpp"
27 using Private = JsArrayImpl;
29 explicit JsArray(std::unique_ptr<Private> impl);
68 void set(uint32_t index, T&& value);
89 void setValue(uint32_t index,
const JsValue& value);
A JavaScript array.
Definition js_array.hpp:25
std::vector< JsValue > toVector()
Fetches the JavaScript array values to a vector.
JsValue get(uint32_t index)
Returns the element by the specified index.
uint32_t length()
Returns the length of the JavaScript array.
void set(uint32_t index, T &&value)
Inserts the specified element into the array at the specified index.
Definition js_array_detail.hpp:14
A JavaScript object.
Definition js_object.hpp:26
A JavaScript value.
Definition js_value.hpp:44