Sha256: 4c8d00b96f9b51c5b938d557c03f670e20bc536e57fbc1fe91c40396b471ea59

Contents?: true

Size: 490 Bytes

Versions: 26

Compression:

Stored size: 490 Bytes

Contents

'use strict';

const Container = require('./container');
const Node = require('./node');

class Comment extends Node {
  constructor (opts) {
    super(opts);
    this.type = 'comment';
    this.inline = Object(opts).inline || false;
  }

  toString () {
    return [
      this.raws.before,
      this.inline ? '//' : '/*',
      String(this.value),
      this.inline ? '' : '*/',
      this.raws.after
    ].join('');
  }
};

Container.registerWalker(Comment);

module.exports = Comment;

Version data entries

26 entries across 25 versions & 8 rubygems

Version Path
ezii-os-5.2.1 node_modules/postcss-values-parser/lib/comment.js
ezii-os-2.0.1 node_modules/postcss-values-parser/lib/comment.js
ezii-os-1.1.0 node_modules/postcss-values-parser/lib/comment.js
ezii-os-1.0.0 node_modules/postcss-values-parser/lib/comment.js
ezii-os-0.0.0.1.0 node_modules/postcss-values-parser/lib/comment.js
ezii-os-0.0.0.0.1 node_modules/postcss-values-parser/lib/comment.js