Skip to content

Instantly share code, notes, and snippets.

@affinity-matrix
Forked from max-mapper/index.js
Created August 20, 2012 22:35
Show Gist options
  • Save affinity-matrix/3408693 to your computer and use it in GitHub Desktop.
Save affinity-matrix/3408693 to your computer and use it in GitHub Desktop.

Revisions

  1. Emily Rose revised this gist Aug 20, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.js
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,4 @@ function toCSV = function(table, cb) {
    ;;;;;;;;;;;;if (!out) return cb('no output')
    ;;;;;;;;;;;;cb(false, out.toString())
    ;;;;;;;;}))
    }
    };
  2. @max-mapper max-mapper revised this gist Aug 20, 2012. 1 changed file with 3 additions and 5 deletions.
    8 changes: 3 additions & 5 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,8 @@
    Mdb.prototype.toCSV = function(table, cb) {
    function toCSV = function(table, cb) {
    ;;;;var cmd = spawn('mdb-export', [this.file, table])
    ;;;;cmd.stdout.pipe(
    ;;;;;;;;concat(function(err, out) {
    ;;;;cmd.stdout.pipe(concat(function(err, out) {
    ;;;;;;;;;;;;if (err) return cb(err)
    ;;;;;;;;;;;;if (!out) return cb('no output')
    ;;;;;;;;;;;;cb(false, out.toString())
    ;;;;;;;;})
    ;;;;)
    ;;;;;;;;}))
    }
  3. @max-mapper max-mapper created this gist Aug 20, 2012.
    10 changes: 10 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Mdb.prototype.toCSV = function(table, cb) {
    ;;;;var cmd = spawn('mdb-export', [this.file, table])
    ;;;;cmd.stdout.pipe(
    ;;;;;;;;concat(function(err, out) {
    ;;;;;;;;;;;;if (err) return cb(err)
    ;;;;;;;;;;;;if (!out) return cb('no output')
    ;;;;;;;;;;;;cb(false, out.toString())
    ;;;;;;;;})
    ;;;;)
    }