主题
valuesIn
js
_.valuesIn(object)
创建 object
自己的和继承的可枚举字符串键属性值数组。
¥Creates an array of the own and inherited enumerable string keyed property values of object
.
注意:非对象值被强制转换为对象。
¥Note: Non-object values are coerced to objects.
新增于
¥Since
3.0.0
参数
¥Arguments
object
(对象):的反面;¥
object
(Object): The object to query.
返回
¥Returns
(数组):返回属性值的数组。
¥(Array): Returns the array of property values.
示例
¥Example
js
function Foo() {
this.a = 1;
this.b = 2;
}
Foo.prototype.c = 3;
_.valuesIn(new Foo);
// => [1, 2, 3] (iteration order is not guaranteed)