alf-converter
v1.2.1
Published
Converts ALF data to latest schema version
Downloads
8
Readme
alf-converter
Converts ALF data to latest schema version
Install
npm install --save alf-converter
Usage
Usage: bin [options] <files...>
Options:
-h, --help output usage information
-V, --version output the version number
-f, --format <format> source file format (default, auto-detect)
-v, --version <version> source file format version (default, auto-detect)
-o, --output <file> Write output to <file> instead of stdout
API
Import
// default, ES5 (pre-compiled)
import converter from 'alf-converter/lib/converter'
import detector from 'alf-converter/lib/detector'
Require
// default, ES5 (pre-compiled)
var converter = require('alf-converter/lib/converter')
var detector = require('alf-converter/lib/detector')
converter(data [, options])
Returns a Promise
options:
const options = {
format: 'HAR',
version: '1.2',
serviceToken: 'token-foo'
}
converter(data, options)
.then(console.log)
.catch(console.error)
- the promise resolves with an object representing the latest ALF version
- If
options
not provided, automatic detection of source object will be triggered usingdetector
Promise below
detector(data)
Returns a Promise
detector(data)
.then(console.log)
.catch(console.error)
- the promise resolves with an object with the following properties
data:
Object
same as thedata
passed to the promiseformat:
String
one of"ALF"
or"HAR"
.
:copyright: www.mashape.com · License: ISC · Github: @mashape · Twitter: @mashape