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.
29 lines
673 B
29 lines
673 B
8 years ago
|
var utils = require('../utils'),
|
||
|
nodes = require('../nodes');
|
||
|
|
||
|
/**
|
||
|
* This is a heler function for the slice method
|
||
|
*
|
||
|
* @param {String|Ident} vals
|
||
|
* @param {Unit} start [0]
|
||
|
* @param {Unit} end [vals.length]
|
||
|
* @return {String|Literal|Null}
|
||
|
* @api public
|
||
|
*/
|
||
|
(module.exports = function slice(val, start, end) {
|
||
|
start = start && start.nodes[0].val;
|
||
|
end = end && end.nodes[0].val;
|
||
|
|
||
|
val = utils.unwrap(val).nodes;
|
||
|
|
||
|
if (val.length > 1) {
|
||
|
return utils.coerce(val.slice(start, end), true);
|
||
|
}
|
||
|
|
||
|
var result = val[0].string.slice(start, end);
|
||
|
|
||
|
return val[0] instanceof nodes.Ident
|
||
|
? new nodes.Ident(result)
|
||
|
: new nodes.String(result);
|
||
|
}).raw = true;
|