 c177363a19
			
		
	
	c177363a19
	
	
	
		
			
			🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			23 lines
		
	
	
		
			634 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			634 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| "use strict";
 | |
| 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;
 |