You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
759 B

name: duk_to_object
proto: |
void duk_to_object(duk_context *ctx, duk_idx_t index);
stack: |
[ ... val! ... ] -> [ ... ToObject(val)! ... ]
summary: |
<p>Replace the value at <code>index</code> with an Ecmascript
<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-9.9">ToObject()</a>
coerced value. There is no return value. Throws an error if value at
<code>index</code> is not
<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-9.10">object coercible</a>,
or if <code>index</code> is invalid.</p>
<p>The following types are not object coercible:</p>
<ul>
<li><code>undefined</code></li>
<li><code>null</code></li>
</ul>
example: |
duk_to_object(ctx, -3);
tags:
- stack
- object
introduced: 1.0.0