static const njs_object_prop_t njs_array_constructor_properties[] =
{
/* Array.name == "Array". */
- { njs_string("Array"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("Array"),
+ },
/* Array.length == 1. */
- { njs_value(NJS_NUMBER, 1, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
/* Array.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
};
static const njs_object_prop_t njs_array_prototype_properties[] =
{
- { njs_native_getter(njs_array_prototype_length),
- njs_string("length"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_slice, 0),
- njs_string("slice"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_push, 0),
- njs_string("push"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_pop, 0),
- njs_string("pop"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_unshift, 0),
- njs_string("unshift"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_shift, 0),
- njs_string("shift"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_to_string, 0),
- njs_string("toString"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_join, 0),
- njs_string("join"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_concat, 0),
- njs_string("concat"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_for_each,
- njs_method_data_size(sizeof(njs_array_next_t))),
- njs_string("forEach"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_some,
- njs_method_data_size(sizeof(njs_array_next_t))),
- njs_string("some"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_array_prototype_every,
- njs_method_data_size(sizeof(njs_array_next_t))),
- njs_string("every"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("length"),
+ .value = njs_native_getter(njs_array_prototype_length),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("slice"),
+ .value = njs_native_function(njs_array_prototype_slice, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("push"),
+ .value = njs_native_function(njs_array_prototype_push, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("pop"),
+ .value = njs_native_function(njs_array_prototype_pop, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("unshift"),
+ .value = njs_native_function(njs_array_prototype_unshift, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("shift"),
+ .value = njs_native_function(njs_array_prototype_shift, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toString"),
+ .value = njs_native_function(njs_array_prototype_to_string, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("join"),
+ .value = njs_native_function(njs_array_prototype_join, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("concat"),
+ .value = njs_native_function(njs_array_prototype_concat, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("forEach"),
+ .value = njs_native_function(njs_array_prototype_for_each,
+ njs_method_data_size(sizeof(njs_array_next_t))),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("some"),
+ .value = njs_native_function(njs_array_prototype_some,
+ njs_method_data_size(sizeof(njs_array_next_t))),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("every"),
+ .value = njs_native_function(njs_array_prototype_every,
+ njs_method_data_size(sizeof(njs_array_next_t))),
+ },
};
static const njs_object_prop_t njs_boolean_constructor_properties[] =
{
/* Boolean.name == "Boolean". */
- { njs_string("Boolean"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("Boolean"),
+ },
/* Boolean.length == 1. */
- { njs_value(NJS_NUMBER, 1, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
/* Boolean.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
};
static const njs_object_prop_t njs_boolean_prototype_properties[] =
{
- { njs_native_getter(njs_primitive_prototype_get_proto),
- njs_string("__proto__"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_function(njs_boolean_prototype_value_of, 0),
- njs_string("valueOf"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_boolean_prototype_to_string, 0),
- njs_string("toString"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("__proto__"),
+ .value = njs_native_getter(njs_primitive_prototype_get_proto),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("valueOf"),
+ .value = njs_native_function(njs_boolean_prototype_value_of, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toString"),
+ .value = njs_native_function(njs_boolean_prototype_to_string, 0),
+ },
};
};
static const njs_object_prop_t null_proto_property = {
- njs_value(NJS_NULL, 0, 0.0),
- njs_string("__proto__"),
- NJS_WHITEOUT, 0, 0, 0,
+ .type = NJS_WHITEOUT,
+ .name = njs_string("__proto__"),
+ .value = njs_value(NJS_NULL, 0, 0.0),
};
ret = njs_object_hash_create(vm, &vm->shared->null_proto_hash,
static const njs_object_prop_t njs_function_constructor_properties[] =
{
/* Function.name == "Function". */
- { njs_string("Function"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("Function"),
+ },
/* Function.length == 1. */
- { njs_value(NJS_NUMBER, 0, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
/* Function.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
};
static const njs_object_prop_t njs_function_prototype_properties[] =
{
- { njs_native_function(njs_function_prototype_call, 0),
- njs_string("call"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_function_prototype_apply, 0),
- njs_string("apply"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_function_prototype_bind, 0),
- njs_string("bind"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("call"),
+ .value = njs_native_function(njs_function_prototype_call, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("apply"),
+ .value = njs_native_function(njs_function_prototype_apply, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("bind"),
+ .value = njs_native_function(njs_function_prototype_bind, 0),
+ },
};
static const njs_object_prop_t njs_eval_function_properties[] =
{
/* eval.name == "eval". */
- { njs_string("eval"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("eval"),
+ },
/* eval.length == 1. */
- { njs_value(NJS_NUMBER, 0, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
};
static const njs_object_prop_t njs_number_constructor_properties[] =
{
/* Number.name == "Number". */
- { njs_string("Number"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("Number"),
+ },
/* Number.length == 1. */
- { njs_value(NJS_NUMBER, 1, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
/* Number.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
};
static const njs_object_prop_t njs_number_prototype_properties[] =
{
- { njs_native_getter(njs_primitive_prototype_get_proto),
- njs_string("__proto__"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("__proto__"),
+ .value = njs_native_getter(njs_primitive_prototype_get_proto),
+ },
- { njs_native_function(njs_number_prototype_value_of, 0),
- njs_string("valueOf"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("valueOf"),
+ .value = njs_native_function(njs_number_prototype_value_of, 0),
+ },
- { njs_native_function(njs_number_prototype_to_string, 0),
- njs_string("toString"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toString"),
+ .value = njs_native_function(njs_number_prototype_to_string, 0),
+ },
};
static const njs_object_prop_t njs_object_constructor_properties[] =
{
- /* Object.name == "name". */
- { njs_string("Object"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ /* Object.name == "Object". */
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("Object"),
+ },
/* Object.length == 1. */
- { njs_value(NJS_NUMBER, 1, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
/* Object.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
/* Object.create(). */
- { njs_native_function(njs_object_create, 0),
- njs_string("create"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("create"),
+ .value = njs_native_function(njs_object_create, 0),
+ },
};
static const njs_object_prop_t njs_object_prototype_properties[] =
{
- { njs_native_getter(njs_object_prototype_get_proto),
- njs_string("__proto__"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_getter(njs_object_prototype_create_constructor),
- njs_string("constructor"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_function(njs_object_prototype_value_of, 0),
- njs_string("valueOf"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_object_prototype_to_string, 0),
- njs_string("toString"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("__proto__"),
+ .value = njs_native_getter(njs_object_prototype_get_proto),
+ },
+
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("constructor"),
+ .value = njs_native_getter(njs_object_prototype_create_constructor),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("valueOf"),
+ .value = njs_native_function(njs_object_prototype_value_of, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toString"),
+ .value = njs_native_function(njs_object_prototype_to_string, 0),
+ },
};
static const njs_object_prop_t njs_regexp_constructor_properties[] =
{
/* RegExp.name == "RegExp". */
- { njs_string("RegExp"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("RegExp"),
+ },
/* RegExp.length == 2. */
- { njs_value(NJS_NUMBER, 1, 2.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 2.0),
+ },
/* RegExp.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
};
static const njs_object_prop_t njs_regexp_prototype_properties[] =
{
- { njs_native_getter(njs_regexp_prototype_last_index),
- njs_string("lastIndex"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_getter(njs_regexp_prototype_global),
- njs_string("global"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_getter(njs_regexp_prototype_ignore_case),
- njs_string("ignoreCase"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_getter(njs_regexp_prototype_multiline),
- njs_string("multiline"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_getter(njs_regexp_prototype_source),
- njs_string("source"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
-
- { njs_native_function(njs_regexp_prototype_to_string, 0),
- njs_string("toString"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_regexp_prototype_test, 0),
- njs_string("test"),
- NJS_METHOD, 0, 0, 0, },
-
- { njs_native_function(njs_regexp_prototype_exec, 0),
- njs_string("exec"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("lastIndex"),
+ .value = njs_native_getter(njs_regexp_prototype_last_index),
+ },
+
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("global"),
+ .value = njs_native_getter(njs_regexp_prototype_global),
+ },
+
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("ignoreCase"),
+ .value = njs_native_getter(njs_regexp_prototype_ignore_case),
+ },
+
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("multiline"),
+ .value = njs_native_getter(njs_regexp_prototype_multiline),
+ },
+
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("source"),
+ .value = njs_native_getter(njs_regexp_prototype_source),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toString"),
+ .value = njs_native_function(njs_regexp_prototype_to_string, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("test"),
+ .value = njs_native_function(njs_regexp_prototype_test, 0),
+ },
+
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("exec"),
+ .value = njs_native_function(njs_regexp_prototype_exec, 0),
+ },
};
static const njs_object_prop_t njs_string_constructor_properties[] =
{
/* String.name == "String". */
- { njs_string("String"),
- njs_string("name"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("name"),
+ .value = njs_string("String"),
+ },
/* String.length == 1. */
- { njs_value(NJS_NUMBER, 1, 1.0),
- njs_string("length"),
- NJS_PROPERTY, 0, 0, 0, },
+ {
+ .type = NJS_PROPERTY,
+ .name = njs_string("length"),
+ .value = njs_value(NJS_NUMBER, 1, 1.0),
+ },
/* String.prototype. */
- { njs_native_getter(njs_object_prototype_create),
- njs_string("prototype"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("prototype"),
+ .value = njs_native_getter(njs_object_prototype_create),
+ },
};
static const njs_object_prop_t njs_string_prototype_properties[] =
{
- { njs_native_getter(njs_primitive_prototype_get_proto),
- njs_string("__proto__"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("__proto__"),
+ .value = njs_native_getter(njs_primitive_prototype_get_proto),
+ },
- { njs_native_getter(njs_string_prototype_length),
- njs_string("length"),
- NJS_NATIVE_GETTER, 0, 0, 0, },
+ {
+ .type = NJS_NATIVE_GETTER,
+ .name = njs_string("length"),
+ .value = njs_native_getter(njs_string_prototype_length),
+ },
- { njs_native_function(njs_string_prototype_value_of, 0),
- njs_string("valueOf"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("valueOf"),
+ .value = njs_native_function(njs_string_prototype_value_of, 0),
+ },
- { njs_native_function(njs_string_prototype_value_of, 0),
- njs_string("toString"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toString"),
+ .value = njs_native_function(njs_string_prototype_value_of, 0),
+ },
- { njs_native_function(njs_string_prototype_concat, 0),
- njs_string("concat"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("concat"),
+ .value = njs_native_function(njs_string_prototype_concat, 0),
+ },
- { njs_native_function(njs_string_prototype_from_utf8, 0),
- njs_string("fromUTF8"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("fromUTF8"),
+ .value = njs_native_function(njs_string_prototype_from_utf8, 0),
+ },
- { njs_native_function(njs_string_prototype_to_utf8, 0),
- njs_string("toUTF8"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toUTF8"),
+ .value = njs_native_function(njs_string_prototype_to_utf8, 0),
+ },
- { njs_native_function(njs_string_prototype_from_bytes, 0),
- njs_string("fromBytes"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("fromBytes"),
+ .value = njs_native_function(njs_string_prototype_from_bytes, 0),
+ },
- { njs_native_function(njs_string_prototype_to_bytes, 0),
- njs_string("toBytes"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("toBytes"),
+ .value = njs_native_function(njs_string_prototype_to_bytes, 0),
+ },
- { njs_native_function(njs_string_prototype_slice, 0),
- njs_string("slice"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("slice"),
+ .value = njs_native_function(njs_string_prototype_slice, 0),
+ },
- { njs_native_function(njs_string_prototype_substring, 0),
- njs_string("substring"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("substring"),
+ .value = njs_native_function(njs_string_prototype_substring, 0),
+ },
- { njs_native_function(njs_string_prototype_substr, 0),
- njs_string("substr"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("substr"),
+ .value = njs_native_function(njs_string_prototype_substr, 0),
+ },
- { njs_native_function(njs_string_prototype_char_at, 0),
- njs_string("charAt"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("charAt"),
+ .value = njs_native_function(njs_string_prototype_char_at, 0),
+ },
- { njs_native_function(njs_string_prototype_char_code_at, 0),
- njs_string("charCodeAt"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("charCodeAt"),
+ .value = njs_native_function(njs_string_prototype_char_code_at, 0),
+ },
/* ECMAScript 6, codePointAt(). */
- { njs_native_function(njs_string_prototype_char_code_at, 0),
- njs_string("codePointAt"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("codePointAt"),
+ .value = njs_native_function(njs_string_prototype_char_code_at, 0),
+ },
- { njs_native_function(njs_string_prototype_index_of, 0),
- njs_string("indexOf"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("indexOf"),
+ .value = njs_native_function(njs_string_prototype_index_of, 0),
+ },
- { njs_native_function(njs_string_prototype_last_index_of, 0),
- njs_string("lastIndexOf"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("lastIndexOf"),
+ .value = njs_native_function(njs_string_prototype_last_index_of, 0),
+ },
- { njs_native_function(njs_string_prototype_search, 0),
- njs_string("search"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("search"),
+ .value = njs_native_function(njs_string_prototype_search, 0),
+ },
- { njs_native_function(njs_string_prototype_match, 0),
- njs_string("match"),
- NJS_METHOD, 0, 0, 0, },
+ {
+ .type = NJS_METHOD,
+ .name = njs_string("match"),
+ .value = njs_native_function(njs_string_prototype_match, 0),
+ },
};