Skip to content

openknowledge-archive/jsontableschema-infer-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jts-infer

Infer a JSON Table Schema from a readable stream of a CSV source

NPM

#API

##jtsInfer(readableStream, [options], callback)

var jtsInfer = require('jts-infer)
  , fs = require('fs);

jtsInfer(fs.createReadStream('path/to/data.csv'), function(err, schema, scores){
  //do something with schema [and scores]
});

###Options

  • separator: separator to separate cells in a row (default to ',')
  • newline: separator to separate different rows (default to '\n')
  • nSample: if specified only the nSample first rows of the source will be used to infer the types otherwise all the rows will be used

#Tests

npm test

#License

MIT

About

Infer a JSON Table Schema from a readable stream of a CSV source

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published