|
62 | 62 | */
|
63 | 63 | ARGUMENT_CHECK_PATTERN = /\(.*,.*\)/,
|
64 | 64 |
|
65 |
| - // Global config options |
| 65 | + // Config options |
66 | 66 |
|
67 | 67 | /**
|
68 | 68 | * @typedef {Object}
|
69 | 69 | *
|
70 | 70 | * @static
|
71 | 71 | * @memberOf js/partial/foreach
|
72 | 72 | *
|
73 |
| - * @property {boolean} [checkArguments=true] |
74 |
| - * Determines whether "foreach" should check the number of arguments in the callback function. |
75 |
| - * If it is enabled and: |
76 |
| - * - when the callback function has one argument, "foreach" will |
77 |
| - * pass one argument to the callback function, which will contain |
78 |
| - * the actual **value** of the container object. |
| 73 | + * @property {boolean} [checkArguments=true] - |
79 | 74 | *
|
80 |
| - * - when the callback function has two arguments, "foreach" will |
81 |
| - * pass two arguments to the callback function, the first will be |
82 |
| - * the actual **key**, the second will be the |
83 |
| - * actual **value** of the container object. |
| 75 | + * Determines whether "foreach" should check the number of arguments in the callback function. |
| 76 | + * If it is enabled and: |
| 77 | + * - when the callback function has one argument, "foreach" will |
| 78 | + * pass one argument to the callback function, which will contain |
| 79 | + * the actual **value** of the container object. |
| 80 | + * |
| 81 | + * - when the callback function has two arguments, "foreach" will |
| 82 | + * pass two arguments to the callback function, the first will be |
| 83 | + * the actual **key**, the second will be the |
| 84 | + * actual **value** of the container object. |
84 | 85 | *
|
85 |
| - * If it is disabled, always two arguments will be passed to the |
86 |
| - * callback function, the first will be the actual **key**, |
87 |
| - * the second will be the actual **value** of the container object. |
| 86 | + * If it is disabled, always two arguments will be passed to the |
| 87 | + * callback function, the first will be the actual **key**, |
| 88 | + * the second will be the actual **value** of the container object. |
88 | 89 | *
|
89 |
| - * @property {boolean} [checkOwnProperty=true] |
90 |
| - * Determines whether "foreach" should check whether the container has |
91 |
| - * the current key as an own property via containerObject.hasOwnProperty(key). |
| 90 | + * @property {boolean} [checkOwnProperty=true] - |
| 91 | + * |
| 92 | + * Determines whether "foreach" should check whether the container has |
| 93 | + * the current key as an own property via containerObject.hasOwnProperty(key). |
92 | 94 | *
|
93 |
| - * If it is enabled, only those key => value pairs will be passed to the callback function, |
94 |
| - * which are own properties of the container object. |
| 95 | + * If it is enabled, only those key => value pairs will be passed to the callback function, |
| 96 | + * which are own properties of the container object. |
95 | 97 | *
|
96 |
| - * If it is disabled, every key => value of the container object will be passed to the callback function. |
| 98 | + * If it is disabled, every key => value of the container object will be passed to the callback function. |
97 | 99 | *
|
98 |
| - * @property {boolean} [castArrayIndex=true] |
99 |
| - * Determines whether "foreach" should cast the indices of the array-like container object |
100 |
| - * to integers (in {number}). |
| 100 | + * @property {boolean} [castArrayIndex=true] - |
| 101 | + * |
| 102 | + * Determines whether "foreach" should cast the indices of the array-like container object |
| 103 | + * to integers (in {number}). |
101 | 104 | *
|
102 |
| - * If it is enabled, when and **only when** two arguments (key => value) will be passed to |
103 |
| - * the callback function, the first argument (key) will be cast to an integer (in {number}). |
| 105 | + * If it is enabled, when and **only when** two arguments (key => value) will be passed to |
| 106 | + * the callback function, the first argument (key) will be cast to an integer (in {number}). |
104 | 107 | *
|
105 |
| - * If it is disabled, no change and/or cast will occur on the first (key) argument. |
| 108 | + * If it is disabled, no change and/or cast will occur on the first (key) argument. |
106 | 109 | */
|
107 | 110 | config = {
|
108 | 111 | checkArguments : true,
|
|
166 | 169 | * @function processOptions
|
167 | 170 | * @memberOf js/partial/foreach
|
168 | 171 | *
|
169 |
| - * @param {configOptions} [options] The object, which contains the config options. |
170 |
| - * @param {boolean} [setGlobal] Whether the passed config options should change |
171 |
| - * the global config options for "foreach". |
| 172 | + * @param {config} [options] The object, which contains the config options. |
| 173 | + * @param {boolean} [setGlobal] Whether the passed config options should change |
| 174 | + * the global config options for "foreach". |
172 | 175 | *
|
173 | 176 | * @returns {config} The valid, changeable config options with their actual, current value.
|
174 | 177 | */
|
|
220 | 223 | * @public
|
221 | 224 | * @function foreach
|
222 | 225 | *
|
223 |
| - * @param {*} object The container object. |
224 |
| - * @param {function} callback The callback function to receive key or key=>value arguments. |
225 |
| - * |
226 |
| - * @param {object} [options] The object, which contains the config options. |
227 |
| - * |
228 |
| - * @param {boolean} [options.checkArguments=true] Sets whether "foreach" should check the number of arguments |
229 |
| - * in the callback function. For detailed description, |
230 |
| - * check: {@link checkArguments} |
231 |
| - * |
232 |
| - * @param {boolean} [options.checkOwnProperty=true] Sets whether "foreach" should only pass the key or |
233 |
| - * key=>value pairs, if they pass the .hasOwnProperty(...) test. |
234 |
| - * For detailed description, check: {@link checkOwnProperty} |
235 |
| - * |
236 |
| - * @param {boolean} [options.castArrayIndex=true] Sets whether "foreach" should cast the indices (key) of the |
237 |
| - * array-like container object to integers. |
238 |
| - * For detailed description, check: {@link castArrayIndex} |
| 226 | + * @param {*} object The container object. |
| 227 | + * @param {function} callback The callback function to receive key or key=>value arguments. |
| 228 | + * @param {config} [options] The object, which contains the config options. |
| 229 | +
|
239 | 230 | * @example
|
240 | 231 | * // for arrays
|
241 | 232 | * var array = [1, 2, 3, 4, 5];
|
|
372 | 363 | * @function setOptions
|
373 | 364 | * @memberOf js/partial/foreach
|
374 | 365 | *
|
375 |
| - * @param {configOptions} [options] The object, which contains the config options. |
| 366 | + * @param {config} [options] The object, which contains the config options. |
376 | 367 | *
|
377 | 368 | * @return {void}
|
378 | 369 | */
|
|
387 | 378 | * @function getOptions
|
388 | 379 | * @memberOf js/partial/foreach
|
389 | 380 | *
|
390 |
| - * @returns {configOptions} The valid, changeable config options with their actual, current value. |
| 381 | + * @returns {config} The valid, changeable config options with their actual, current value. |
391 | 382 | */
|
392 | 383 | foreach.getOptions = function() {
|
393 | 384 | return processOptions();
|
|
0 commit comments