We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ed7147 commit 693b45eCopy full SHA for 693b45e
index.js
@@ -10,16 +10,18 @@ var Identity = require('./lib/identity');
10
* Stringfy the given AST `node`.
11
*
12
* @param {Object} node
13
- * @param {Object} options
+ * @param {Object} [options]
14
* @return {String}
15
* @api public
16
*/
17
18
module.exports = function(node, options){
19
- if (options.compress) {
20
- return new Compressed(options).compile(node);
21
- }
+ options = options || {};
22
23
- return new Identity(options).compile(node);
+ var compiler = options.compress
+ ? new Compressed(options)
+ : new Identity(options);
24
+
25
+ return compiler.compile(node);
26
};
27
0 commit comments