Skip to content

Commit 29c5833

Browse files
committed
Tinker with doclets.io
1 parent 304e1af commit 29c5833

File tree

1 file changed

+38
-47
lines changed

1 file changed

+38
-47
lines changed

src/js-partial-foreach.js

+38-47
Original file line numberDiff line numberDiff line change
@@ -62,47 +62,50 @@
6262
*/
6363
ARGUMENT_CHECK_PATTERN = /\(.*,.*\)/,
6464

65-
// Global config options
65+
// Config options
6666

6767
/**
6868
* @typedef {Object}
6969
*
7070
* @static
7171
* @memberOf js/partial/foreach
7272
*
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] -
7974
*
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.
8485
*
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.
8889
*
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).
9294
*
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.
9597
*
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.
9799
*
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}).
101104
*
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}).
104107
*
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.
106109
*/
107110
config = {
108111
checkArguments : true,
@@ -166,9 +169,9 @@
166169
* @function processOptions
167170
* @memberOf js/partial/foreach
168171
*
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".
172175
*
173176
* @returns {config} The valid, changeable config options with their actual, current value.
174177
*/
@@ -220,22 +223,10 @@
220223
* @public
221224
* @function foreach
222225
*
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+
239230
* @example
240231
* // for arrays
241232
* var array = [1, 2, 3, 4, 5];
@@ -372,7 +363,7 @@
372363
* @function setOptions
373364
* @memberOf js/partial/foreach
374365
*
375-
* @param {configOptions} [options] The object, which contains the config options.
366+
* @param {config} [options] The object, which contains the config options.
376367
*
377368
* @return {void}
378369
*/
@@ -387,7 +378,7 @@
387378
* @function getOptions
388379
* @memberOf js/partial/foreach
389380
*
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.
391382
*/
392383
foreach.getOptions = function() {
393384
return processOptions();

0 commit comments

Comments
 (0)