Added njs_vm_object_keys().
diff --git a/src/njs.h b/src/njs.h
index 1e4963f..39b68fb 100644
--- a/src/njs.h
+++ b/src/njs.h
@@ -402,6 +402,8 @@
 
 NJS_EXPORT njs_int_t njs_vm_object_alloc(njs_vm_t *vm, njs_value_t *retval,
     ...);
+NJS_EXPORT njs_value_t *njs_vm_object_keys(njs_vm_t *vm, njs_value_t *value,
+    njs_value_t *retval);
 NJS_EXPORT njs_value_t *njs_vm_object_prop(njs_vm_t *vm,
     njs_value_t *value, const njs_str_t *key, njs_opaque_value_t *retval);
 
diff --git a/src/njs_vm.c b/src/njs_vm.c
index 0277ff3..bb6018c 100644
--- a/src/njs_vm.c
+++ b/src/njs_vm.c
@@ -976,6 +976,23 @@
 }
 
 
+njs_value_t *
+njs_vm_object_keys(njs_vm_t *vm, njs_value_t *value, njs_value_t *retval)
+{
+    njs_array_t  *keys;
+
+    keys = njs_value_own_enumerate(vm, value, NJS_ENUM_KEYS,
+                                   NJS_ENUM_STRING, 0);
+    if (njs_slow_path(keys == NULL)) {
+        return NULL;
+    }
+
+    njs_set_array(retval, keys);
+
+    return retval;
+}
+
+
 njs_int_t
 njs_vm_array_alloc(njs_vm_t *vm, njs_value_t *retval, uint32_t spare)
 {