.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / postcss-value-parser / lib / index.js
1 var parse = require("./parse");
2 var walk = require("./walk");
3 var stringify = require("./stringify");
4
5 function ValueParser(value) {
6   if (this instanceof ValueParser) {
7     this.nodes = parse(value);
8     return this;
9   }
10   return new ValueParser(value);
11 }
12
13 ValueParser.prototype.toString = function() {
14   return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
15 };
16
17 ValueParser.prototype.walk = function(cb, bubble) {
18   walk(this.nodes, cb, bubble);
19   return this;
20 };
21
22 ValueParser.unit = require("./unit");
23
24 ValueParser.walk = walk;
25
26 ValueParser.stringify = stringify;
27
28 module.exports = ValueParser;