Skip to content

Commit

Permalink
client-side log
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Apr 21, 2017
1 parent 7324391 commit 442f4ae
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/log/client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
'use strict';
const fns = require('../fns');

const colors = {
'Person': '#6393b9',
'Pronoun': '#81acce',
Expand All @@ -14,10 +16,18 @@ const colors = {
};

const tag = (t, pos, reason) => {

let title = t.normal || '[' + t.silent_term + ']';
title = fns.leftPad('\'' + title + '\'', 12);
title += ' -> ' + pos;
title += fns.rightPad((reason || ''), 15);
console.log('%c' + title, ' color: #a2c99c');
};
const untag = (t, pos, reason) => {

let title = t.normal || '[' + t.silent_term + ']';
title = fns.leftPad('\'' + title + '\'', 12);
title += ' ~* ' + pos;
title += ' ' + (reason || '');
console.log('%c' + title, ' color: #b66a6a');
};
module.exports = {
tag: tag,
Expand Down

0 comments on commit 442f4ae

Please sign in to comment.