File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1818@set_index external set : ({.. }, string , 'a ) => unit = ""
1919@set_index external setSymbol : ({.. }, Core__Symbol .t , 'a ) => unit = ""
2020
21- @val external keysToArray : {.. } => array <string > = "Object.keys"
21+ /**
22+ `keysToArray` returns an array of an object's own enumerable string-keyed property names.
23+
24+ ## Examples
25+
26+ ```rescript
27+ {"a": 1, "b": 2}->Object.keysToArray // ["a", "b"]
28+ {"a": undefined}->Object.keysToArray // ["a"]
29+ Object.empty()->Object.keysToArray // []
30+ ```
31+ ## Specifications
32+ - [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.keys)
33+ - [Object.keys on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys)
34+ */
35+ @val
36+ external keysToArray : {.. } => array <string > = "Object.keys"
2237
2338@val external hasOwnProperty : ({.. }, string ) => bool = "Object.prototype.hasOwnProperty.call"
2439
You can’t perform that action at this time.
0 commit comments