1.2.1 • Published 10 years ago

alf-converter v1.2.1

Weekly downloads
4
License
ISC
Repository
github
Last release
10 years ago

alf-converter version License

Converts ALF data to latest schema version

Build Status Downloads Code Climate Coverage Status Dependencies

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

  • data: Object (Required) a single HAR or ALF object

  • options:

    • format: String one of "ALF" or "HAR".

    • version: String HAR or ALF schema version number

    • serviceToken: Boolea optionalserviceToken` value to provide in final output if missing from input.

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 using detector Promise below

detector(data)

Returns a Promise

  • data: Object (Required) a single HAR or ALF object
detector(data)
  .then(console.log)
  .catch(console.error)
  • the promise resolves with an object with the following properties
  • data: Object same as the data passed to the promise

  • format: String one of "ALF" or "HAR".

  • version: String HAR or ALF schema version number


:copyright: www.mashape.com  ·  License: ISC  ·  Github: @mashape  ·  Twitter: @mashape

1.2.1

10 years ago

1.2.0

10 years ago

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago