2.0.1 • Published 8 years ago

process-file v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

process-file Build Status

Process a file and return the results as a promise

Install

$ npm install --save process-file

Usage

const csvParser = require('csv-parser');
const processFile = require('process-file');

processFile('unicorn.csv', csvParser()).then(data => {
	console.log(data);
	//=> [{foo: 'bar', unicorn: 'awesome'}]
});

API

processFile(file, stream)

Returns a promise that resolves to your processed result.

file

Required Type: string, buffer

File to process.

stream

Required Type: object

Stream to process the file with.

License

MIT © Kevin Mårtensson