Skip to content

solee0524/koa-simple-json2csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koa-simple-json2csv

A simple json to csv module to support koa.

NPM Version Coverage Status Build Status Downloads Dependency Status License

Usage

var json2csv = require('koa-simple-json2csv');

var authors = [{
  name: 'solee',
  homepage: 'http://solee.me',
  repo: {
    url: 'https://github.com/solee0524/koa-simple-json2csv.git',
    type: 'git'
  },
  keys: ['coo"l', 'lol']
}, {
  name: 'solee_clone',
  homepage: 'http://solee.me',
  repo: {
    url: 'https://github.com/solee0524/koa-simple-json2csv.git',
    type: 'git'
  },
  keys: ['clone', 'myth']
}];

var options = {
  data: authors,
  fields: ['name', 'homepage', 'repo.url', 'keys']
}

var csv = yield json2csv(options);

data and fields in options must be Array

License

MIT © Bo Li (solee.me)

About

A simple json to csv module to support koa.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published