traffic-fine-calculator

0.9.1 • Public • Published

traffic-fine-calculator

By Oceanhouse21

Build Status

A leightweight traffic fine calculator for JavaScript. Currently only German law is supported.

USAGE

var traffic-fine-calculator = require('traffic-fine-calculator')
 
// Arguments depend on type of traffic fine
// Example for speeding, speed is in km/h
var result = traffic-fine-calculator(type: 'speeding', speed: 50, in_town: false)
// 'result: "3 Punkte und Geld- oder Freiheitsstrafe und Führerscheinentrzug"'

ARGUMENTS

Example usage for different types

Speeding

traffic-fine-calculator({
    type: 'speeding',
    speed: 50,
    in_town: false //out of town
});

Distance

traffic-fine-calculator({
    type: 'distance',
    speed: 50,
    distance: 0.1, // less than 1/10 of half of the speedometer
    thread: true,
    damage: true
});

Alcohol

traffic-fine-calculator({
    type: 'alcohol',
    permille: 50,
    entries: 3,
    probation: true,
    thread: false
});

Traffic light

traffic-fine-calculator({
    type: 'traffic_light',
    more_than_one_sec: true,
    thread: true,
    damage: false
});

LICENSE

MIT License. Copyright 2014-2015 Oceanhouse21 GmbH. http://www.oceanhouse21.com

You are not granted rights or licenses to the trademarks of Oceanhouse21 GmbH, including without limitation the traffic-fine-calculator name.

Readme

Keywords

Package Sidebar

Install

npm i traffic-fine-calculator

Weekly Downloads

1

Version

0.9.1

License

MIT

Last publish

Collaborators

  • oceanhouse21