UNPKG

jin-app

Version:

A CLI app for taking simple notes without ever leaving the terminal.

11 lines (9 loc) 220 B
const chalk = require('chalk') const fs = require('fs') module.exports = function read (path) { try { return JSON.parse(fs.readFileSync(path)) } catch (error) { console.log(chalk.red(error)) } }