uk-car-tax-calculator
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

UK Car Tax calculator

A node module to calculate vehicle tax rates for cars and vans in the UK based on the fuel type, engine size and when the vehicle was registered.

Build Status

Installation

npm install uk-car-tax-calculator

Usage

const calculateTax = require('uk-car-tax-calculator') // or es modules
 
const tax = calculateTax({
  registrationDate: new Date(2001, 3, 1),
  co2: 201,
  fuel: 'Hybrid'
})
 
console.log(tax.price) // prints 315

For a more comprehensive guide to usage check test/index.test.js

Contributing

PRs accepted, especially those concerning updates to UK law.

This project is linted with eslint using prettier, and runs tests with jest - these will need to pass before any PR is accepted.

Readme

Keywords

none

Package Sidebar

Install

npm i uk-car-tax-calculator

Weekly Downloads

18

Version

2.0.0

License

MIT

Unpacked Size

329 kB

Total Files

19

Last publish

Collaborators

  • rymate1234