Creates an array of the own enumerable string keyed property values of `object`. **Note:** Non-object values are coerced to objects.
function Foo() {
this.a = 1
this.b = 2
}
Foo.prototype.c = 3
values(new Foo)
// => [1, 2] (iteration order is not guaranteed)
values('hi')
// => ['h', 'i']
| Name | Type | Attribute | Description |
|---|---|---|---|
| object | The object to query. |
{
"comment": "/**\r\n * Creates an array of the own enumerable string keyed property values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @since 0.1.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @see keys, valuesIn\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1\r\n * this.b = 2\r\n * }\r\n *\r\n * Foo.prototype.c = 3\r\n *\r\n * values(new Foo)\r\n * // => [1, 2] (iteration order is not guaranteed)\r\n *\r\n * values('hi')\r\n * // => ['h', 'i']\r\n */",
"meta": {
"range": [
637,
730
],
"filename": "values.js",
"lineno": 29,
"path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
"code": {
"id": "astnode100011603",
"name": "values",
"type": "FunctionDeclaration",
"paramnames": [
"object"
]
}
},
"description": "Creates an array of the own enumerable string keyed property values of `object`.\r\r**Note:** Non-object values are coerced to objects.",
"since": "0.1.0",
"tags": [
{
"originalTitle": "category",
"title": "category",
"text": "Object",
"value": "Object"
}
],
"params": [
{
"type": {
"names": [
"Object"
]
},
"description": "The object to query.",
"name": "object"
}
],
"returns": [
{
"type": {
"names": [
"Array"
]
},
"description": "Returns the array of property values."
}
],
"see": [
"keys, valuesIn"
],
"examples": [
"function Foo() {\r this.a = 1\r this.b = 2\r}\r\rFoo.prototype.c = 3\r\rvalues(new Foo)\r// => [1, 2] (iteration order is not guaranteed)\r\rvalues('hi')\r// => ['h', 'i']"
],
"name": "values",
"longname": "values",
"kind": "function",
"scope": "global",
"___id": "T000002R001051",
"___s": true,
"filepath": "values.js"
}