0.0.15 • Published 10 years ago

rating-utils v0.0.15

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

Rating Utils for Node.js

Build Status Coverage Status

Library of helper methods for rating insurance policies

Features

  • Prorata utilities to get prorate factor, and calculate net change premium
  • Many more features to come, just getting started

Installation

npm install rating-utils

Usage

var rating = require('rating-utils'),
    prorata = rating.prorata;

//full term endorsement
var result = prorata.getProrateFactor('2015-01-01', '2015-12-31'); //result should be 1

//mid term endorsement
var result2 = prorata.getProrateFactor('2015-01-01', '2015-06-30'); //result should be approx .5

//calculate net change premium of mid-term endorsement
var newFullTermAmount = 100;
var prevFullTermAmount = 0;
var policyEffectiveDate = '2015-01-01';
var revisionEffectiveDate = '2015-06-30';
var netchange = prorata.getNetChangeAmount(newFullTermAmount, prevFullTermAmount, policyEffectiveDate, revisionEffectiveDate);

Tests

npm test

Contributing

All our welcome to join in the fun.

0.0.15

10 years ago

0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago