> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/object/values.md).

# \_.values

**语法：**

```javascript
_.values(object)
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L13927)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.values)

**描述：**

创建`object`自身可枚举属性的值为数组。

> 注意: 非对象的值会强制转换为对象。

**开始版本：**&#x30;.1.0

**参数：**

* `object (Object)`: 要检索的对象。

**返回值：**

* `(Array)`: 返回对象属性的值的数组。

**例子：**

```javascript
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']
```
