Urara-Blog/node_modules/.pnpm-store/v3/files/35/860b8a37a2ed9d8cc6085c8d12f3f8b75475dddc9559d4bd18105d41243d521ae0240489bb2b2216098cc9f27bd4077b16aada9c10a8b4dc6036ba9bc93069
2022-08-14 01:14:53 +08:00

28 lines
607 B
Text

var parse = require("./parse");
var walk = require("./walk");
var stringify = require("./stringify");
function ValueParser(value) {
if (this instanceof ValueParser) {
this.nodes = parse(value);
return this;
}
return new ValueParser(value);
}
ValueParser.prototype.toString = function() {
return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
};
ValueParser.prototype.walk = function(cb, bubble) {
walk(this.nodes, cb, bubble);
return this;
};
ValueParser.unit = require("./unit");
ValueParser.walk = walk;
ValueParser.stringify = stringify;
module.exports = ValueParser;