mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 03:47:50 +00:00
Add ES6 notes to _.keys, _.keysIn, _.values, & _.valuesIn. [ci skip]
This commit is contained in:
16
lodash.js
16
lodash.js
@@ -8639,6 +8639,10 @@
|
|||||||
/**
|
/**
|
||||||
* Creates an array of the own enumerable property names of `object`.
|
* Creates an array of the own enumerable property names of `object`.
|
||||||
*
|
*
|
||||||
|
* **Note:** Non-object values are coerced to objects. See the
|
||||||
|
* [ES6 spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys)
|
||||||
|
* for more details.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Object
|
* @category Object
|
||||||
@@ -8655,6 +8659,9 @@
|
|||||||
*
|
*
|
||||||
* _.keys(new Shape);
|
* _.keys(new Shape);
|
||||||
* // => ['x', 'y'] (iteration order is not guaranteed)
|
* // => ['x', 'y'] (iteration order is not guaranteed)
|
||||||
|
*
|
||||||
|
* _.keys('hi');
|
||||||
|
* // => ['0', '1']
|
||||||
*/
|
*/
|
||||||
var keys = !nativeKeys ? shimKeys : function(object) {
|
var keys = !nativeKeys ? shimKeys : function(object) {
|
||||||
if (object) {
|
if (object) {
|
||||||
@@ -8671,6 +8678,8 @@
|
|||||||
/**
|
/**
|
||||||
* Creates an array of the own and inherited enumerable property names of `object`.
|
* Creates an array of the own and inherited enumerable property names of `object`.
|
||||||
*
|
*
|
||||||
|
* **Note:** Non-object values are coerced to objects.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Object
|
* @category Object
|
||||||
@@ -9037,6 +9046,8 @@
|
|||||||
/**
|
/**
|
||||||
* Creates an array of the own enumerable property values of `object`.
|
* Creates an array of the own enumerable property values of `object`.
|
||||||
*
|
*
|
||||||
|
* **Note:** Non-object values are coerced to objects.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Object
|
* @category Object
|
||||||
@@ -9053,6 +9064,9 @@
|
|||||||
*
|
*
|
||||||
* _.values(new Shape(2, 1));
|
* _.values(new Shape(2, 1));
|
||||||
* // => [2, 1] (iteration order is not guaranteed)
|
* // => [2, 1] (iteration order is not guaranteed)
|
||||||
|
*
|
||||||
|
* _.values('hi');
|
||||||
|
* // => ['h', 'i']
|
||||||
*/
|
*/
|
||||||
function values(object) {
|
function values(object) {
|
||||||
return baseValues(object, keys(object));
|
return baseValues(object, keys(object));
|
||||||
@@ -9062,6 +9076,8 @@
|
|||||||
* Creates an array of the own and inherited enumerable property values
|
* Creates an array of the own and inherited enumerable property values
|
||||||
* of `object`.
|
* of `object`.
|
||||||
*
|
*
|
||||||
|
* **Note:** Non-object values are coerced to objects.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Object
|
* @category Object
|
||||||
|
|||||||
Reference in New Issue
Block a user