Fully end to end encrypted anonymous chat program. Server only stores public key lookup for users and the encrypted messages. No credentials are transfered to the server, but kept in local browser storage. This allows 100% safe chatting. https://safechat.ch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

53 lines
913 B

/*!
* Stylus - Token
* Copyright (c) Automattic <developer.wordpress.com>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var inspect = require('util').inspect;
/**
* Initialize a new `Token` with the given `type` and `val`.
*
* @param {String} type
* @param {Mixed} val
* @api private
*/
var Token = exports = module.exports = function Token(type, val) {
this.type = type;
this.val = val;
};
/**
* Custom inspect.
*
* @return {String}
* @api public
*/
Token.prototype.inspect = function(){
var val = ' ' + inspect(this.val);
return '[Token:' + this.lineno + ':' + this.column + ' '
+ '\x1b[32m' + this.type + '\x1b[0m'
+ '\x1b[33m' + (this.val ? val : '') + '\x1b[0m'
+ ']';
};
/**
* Return type or val.
*
* @return {String}
* @api public
*/
Token.prototype.toString = function(){
return (undefined === this.val
? this.type
: this.val).toString();
};