Skip to content

Commit 7ee9c2d

Browse files
committed
Update JSDoc
1 parent b08ae3f commit 7ee9c2d

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

lib/options/vendor-prefix-align.js

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ module.exports = {
22

33
/**
44
* Internal
5-
* Containt vendor-prefixes list
5+
*
6+
* Containt vendor-prefixes list.
67
*/
78
_prefixesList: [
89
'webkit',
@@ -14,7 +15,7 @@ module.exports = {
1415
/**
1516
* Internal
1617
*
17-
* Create object which contains info about vendor prefix used in propertyName
18+
* Create object which contains info about vendor prefix used in propertyName.
1819
* @param {String} propertyName property name
1920
* @returns {Object|undefined}
2021
*/
@@ -36,6 +37,14 @@ module.exports = {
3637
return result;
3738
},
3839

40+
/**
41+
* Internal
42+
*
43+
* Walk across nodes, and call payload for every node that pass selector check.
44+
* @param {node} node
45+
* @param {function} selector
46+
* @param {function} payload
47+
*/
3948
_walk: function(node, selector, payload) {
4049
node.forEach(function(item, i) {
4150
var info = this._getPrefixInfo(selector(item));
@@ -44,16 +53,38 @@ module.exports = {
4453
}, this);
4554
},
4655

56+
/**
57+
* Internal
58+
*
59+
* Selector for property name.
60+
* @param {node} item
61+
* @returns {String|false|undefined}
62+
*/
4763
_declName: function(item) {
4864
return item[0] === 'declaration' && item[1][1][1];
4965
},
5066

67+
/**
68+
* Internal
69+
*
70+
* Selector for value name.
71+
* @param {node} item
72+
* @returns {String|false|undefined}
73+
*/
5174
_valName: function(item) {
5275
return item[0] === 'declaration' && item[2] && item[2][2] &&
5376
item[2][2][0] === 'funktion' && item[2][2][1][0] === 'ident' &&
5477
item[2][2][1][1];
5578
},
5679

80+
/**
81+
* Internal
82+
*
83+
* Update dict which contains info about items align.
84+
* @param {Object} info,
85+
* @param {Object} dict,
86+
* @param {String} whitespaceNode
87+
*/
5788
_updateDict: function(info, dict, whitespaceNode) {
5889
if (info.prefixLength === 0) return;
5990

@@ -67,6 +98,13 @@ module.exports = {
6798
};
6899
},
69100

101+
/**
102+
* Return string with correct number of spaces for info.baseName property.
103+
* @param {Object} info,
104+
* @param {Object} dict,
105+
* @param {String} whitespaceNode
106+
* @returns {String}
107+
*/
70108
_updateIndent: function(info, dict, whitespaceNode) {
71109
if (!dict[info.baseName])
72110
return whitespaceNode;

0 commit comments

Comments
 (0)