Skip to content

Commit 282dd8d

Browse files
committed
add some docs
1 parent aacf134 commit 282dd8d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11

2+
/**
3+
* Stringfy the given AST `node`.
4+
*
5+
* @param {Object} node
6+
* @param {Object} options
7+
* @return {String}
8+
* @api public
9+
*/
10+
211
module.exports = function(node, options){
312
options = options || {};
413
return options.compress
514
? node.stylesheet.rules.map(rule(options)).join('')
615
: node.stylesheet.rules.map(rule(options)).join('\n\n');
716
};
817

18+
/**
19+
* Compile rule.
20+
*/
21+
922
function rule(options) {
1023
if (options.compress) {
1124
return function(rule) {
@@ -24,6 +37,10 @@ function rule(options) {
2437
}
2538
}
2639

40+
/**
41+
* Compile declarations.
42+
*/
43+
2744
function declaration(options) {
2845
if (options.compress) {
2946
return function(decl){

0 commit comments

Comments
 (0)