This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "log-colors", | |
"version": "1.0.0", | |
"description": "A colorized winston console logger", | |
"main": "index.js", | |
"scripts": { | |
"test": "node_modules/.bin/mocha --reporter spec" | |
}, | |
"repository": { | |
"type": "git", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const expandHomeDir = require('expand-home-dir'); | |
const zshHistoryRaw = fs.readFileSync(expandHomeDir('~/.zsh_history'), 'utf8'); | |
const zshHistoryLines = zshHistoryRaw.split('\n'); | |
const transformLine = line => { | |
try { |