/** * A Node element * @class Node * @memberof AST * @param {({name: string, attribs: Array, children: Array})} opts - The node options */ var Node = module.exports = function Node(opts) { if(!(this instanceof Node)) return new Node(opts); /** @member {string} Node#name */ this.name = opts.name || null; /** @member {Attrib} Node#attribs */ this.attribs = opts.attribs || []; /** @member {Node[]} Node#nodes */ this.children = opts.children || []; }