Sha256: dd5d42d2a4e072d776234667dc9a6b07d8f862e376ad8310edd6ad1087d93bb6

Contents?: true

Size: 872 Bytes

Versions: 41

Compression:

Stored size: 872 Bytes

Contents

/*!
 * Stylus - Charset
 * Copyright (c) Automattic <developer.wordpress.com>
 * MIT Licensed
 */

/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a new `Charset` with the given `val`
 *
 * @param {String} val
 * @api public
 */

var Charset = module.exports = function Charset(val){
  Node.call(this);
  this.val = val;
};

/**
 * Inherit from `Node.prototype`.
 */

Charset.prototype.__proto__ = Node.prototype;

/**
 * Return @charset "val".
 *
 * @return {String}
 * @api public
 */

Charset.prototype.toString = function(){
  return '@charset ' + this.val;
};

/**
 * Return a JSON representation of this node.
 *
 * @return {Object}
 * @api public
 */

Charset.prototype.toJSON = function(){
  return {
    __type: 'Charset',
    val: this.val,
    lineno: this.lineno,
    column: this.column,
    filename: this.filename
  };
};

Version data entries

41 entries across 22 versions & 3 rubygems

Version Path
epuber-stylus-source-0.56.0 vendor/lib/nodes/charset.js
epuber-stylus-source-0.54.8 vendor/lib/nodes/charset.js
ela-4.1.6 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.6 node_modules/stylus/lib/nodes/charset.js
ela-4.1.5 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.5 node_modules/stylus/lib/nodes/charset.js
ela-4.1.4 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.4 node_modules/stylus/lib/nodes/charset.js
ela-4.1.3 node_modules/stylus/lib/nodes/charset.js
ela-4.1.3 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.2 node_modules/stylus/lib/nodes/charset.js
ela-4.1.2 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.1 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.1 node_modules/stylus/lib/nodes/charset.js
ela-4.1.0 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-4.1.0 node_modules/stylus/lib/nodes/charset.js
ela-4.0.0 node_modules/stylus/lib/nodes/charset.js
ela-4.0.0 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-3.4.3 node_modules/nib/node_modules/stylus/lib/nodes/charset.js
ela-3.4.3 node_modules/stylus/lib/nodes/charset.js