Skip to content

Commit

Permalink
Add better docs for KssStyleguide.getWeight().
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin committed Aug 1, 2015
1 parent d63176a commit fdefda8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/kss_styleguide.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,14 @@ KssStyleguide.prototype.sortSections = function() {
};

/**
* Helper function for `KssStyleguide.sortSections()` that gets the weight of the
* given reference at the given depth.
* Helper function for `KssStyleguide.sortSections()` that gets the weight of
* the given reference at the given depth.
*
* For example, `styleguide.getWeight('4.3.2.2', 2)` will return the weight for
* section 4.3.
*
* @param {string} reference A section reference.
* @param {int} depth The requested depth.
* @param {int} depth The requested depth (optional).
* @returns {int} The requested weight.
*/
KssStyleguide.prototype.getWeight = function(reference, depth) {
Expand Down

0 comments on commit fdefda8

Please sign in to comment.