alf-converter
Converts ALF data to latest schema version
Last updated 4 years ago by ahmadnassri .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install alf-converter 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.2.1                                ...           latest (4 years ago)

9 Versions

  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.4                                ...           4 years ago
  • 1.1.3                                ...           4 years ago
  • 1.1.2                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |