mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Add more _.toArray doc examples. [ci skip]
This commit is contained in:
15
lodash.js
15
lodash.js
@@ -10113,10 +10113,17 @@
|
|||||||
* @returns {Array} Returns the converted array.
|
* @returns {Array} Returns the converted array.
|
||||||
* @example
|
* @example
|
||||||
*
|
*
|
||||||
* (function() {
|
* _.toArray({ 'a': 1, 'b': 2 });
|
||||||
* return _.toArray(arguments).slice(1);
|
* // => [1, 2]
|
||||||
* }(1, 2, 3));
|
*
|
||||||
* // => [2, 3]
|
* _.toArray('abc');
|
||||||
|
* // => ['a', 'b', 'c']
|
||||||
|
*
|
||||||
|
* _.toArray(1);
|
||||||
|
* // => []
|
||||||
|
*
|
||||||
|
* _.toArray(null);
|
||||||
|
* // => []
|
||||||
*/
|
*/
|
||||||
function toArray(value) {
|
function toArray(value) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user