Daniel J. Summers 015645aa86 Adding request works (mostly)
Everything works except adding the new request back to the list; this
proof of concept is a go, and will be merged to master
2017-09-21 18:45:06 -05:00

13 lines
329 B
JavaScript

'use strict'
import fs from 'fs'
/**
* Read and parse a JSON file
* @param {string} path The path to the file
* @param {string} encoding The encoding of the file (defaults to UTF-8)
* @return {*} The parsed contents of the file
*/
export default (path, encoding = 'utf-8') =>
JSON.parse(fs.readFileSync(path, encoding))