Sha256: 5b5b4f4e7243bcfb6a32c21d4b25917e83b3ff5f7c9cceba8bd96d7a2fadbc04
Contents?: true
Size: 555 Bytes
Versions: 29
Compression:
Stored size: 555 Bytes
Contents
'use strict'; const Container = require('./container'); const Node = require('./node'); class StringNode extends Node { constructor (opts) { super(opts); this.type = 'string'; } toString () { let quote = this.quoted ? this.raws.quote : ''; return [ this.raws.before, quote, // we can't use String() here because it'll try using itself // as the constructor this.value + '', quote, this.raws.after ].join(''); } } Container.registerWalker(StringNode); module.exports = StringNode;
Version data entries
29 entries across 27 versions & 8 rubygems