Skip to content

Instantly share code, notes, and snippets.

@askmike
Last active January 2, 2016 05:59
Show Gist options
  • Save askmike/8261027 to your computer and use it in GitHub Desktop.
Save askmike/8261027 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var _ = require('lodash');
var db = '[' + fs.readFileSync('file.db', 'utf8') + ']';
db = _.map(db.split('\n'), function(line) {
return line + ',';
}).join('\n');
console.log(db)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment