Skip to content

Commit d98a977

Browse files
committed
Docs: Add documentation for attr and arrayEx.attr
1 parent 8f3e693 commit d98a977

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

lib/attr.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
var aeq = (function (aeq) {
22

33
/**
4-
* [description]
4+
* Sets or gets an attribute value for all objects in an array. When getting a
5+
* value, it only returns the valure from the first object.
56
* @memberof aeq
7+
* @see aeq.arrayEx.attr
68
* @method
7-
* @param {array} array [description]
8-
* @param {string} attributeName [description]
9-
* @param {Any} newValue [description]
10-
* @return {Any} [description]
9+
* @param {Any[]} array The array of objects to get or set attribute
10+
* values of.
11+
* @param {string} attributeName The name of the attribute to get or set.
12+
* @param {Any} [newValue] The value to set. If not given, will only get
13+
* the value of the first object.
14+
* @return {Any|undefined} When getting, the value of the attribute.
15+
* When setting, `undefined`.
1116
*/
1217
aeq.attr = function(array, attributeName, newValue) {
1318
var i, il;

lib/objects/array.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,15 @@ var arrayEx = {
261261
},
262262

263263
/**
264-
* Checks the arguments length to determine to get or set
265-
* and it needs an object to get or set attributes to.
264+
* Sets or gets an attribute value for all objects in the array. When getting a
265+
* value, it only returns the valure from the first object.
266266
* @method
267267
* @memberof aeq.arrayEx
268-
* @return {type} [description]
268+
* @param {string} attributeName The name of the attribute to get or set.
269+
* @param {Any} [newValue] The value to set. If not given, will only get
270+
* the value of the first object.
271+
* @return {Any} when getting, the value of the attribute.
272+
* When setting, `undefined`.
269273
* @see aeq.attr
270274
*/
271275
attr: function() {

0 commit comments

Comments
 (0)