source: trip-planner-front/node_modules/postcss-value-parser/lib/index.js@ eed0bf8

Last change on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 607 bytes
Line 
1var parse = require("./parse");
2var walk = require("./walk");
3var stringify = require("./stringify");
4
5function ValueParser(value) {
6 if (this instanceof ValueParser) {
7 this.nodes = parse(value);
8 return this;
9 }
10 return new ValueParser(value);
11}
12
13ValueParser.prototype.toString = function() {
14 return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
15};
16
17ValueParser.prototype.walk = function(cb, bubble) {
18 walk(this.nodes, cb, bubble);
19 return this;
20};
21
22ValueParser.unit = require("./unit");
23
24ValueParser.walk = walk;
25
26ValueParser.stringify = stringify;
27
28module.exports = ValueParser;
Note: See TracBrowser for help on using the repository browser.