Created
September 2, 2017 22:43
-
-
Save imkrish/f1d3a88c259c9ffb1b9c67a2c55fd7e9 to your computer and use it in GitHub Desktop.
02-pipe.js
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
const fs = require('fs') | |
const R = require('ramda') | |
const parseJSONFromFile = R.pipe(fs.readFileSync, JSON.parse) | |
const products = parseJSONFromFile('../products.json') | |
console.log(products) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment