Guest User

Untitled

a guest
Oct 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. fs = require("fs")
  2.  
  3. readJSON = (path, cb) ->
  4. fs.readFile path, "utf8", (err, data) ->
  5.  
  6. cb JSON.parse(data)
  7.  
  8. filename = "wellformed.json" #"malformed.json"
  9.  
  10. readJSON filename, (data) ->
  11. console.log data
  12.  
  13. console.log "end"
Add Comment
Please, Sign In to add comment