Socket
Socket
Sign inDemoInstall

rating-utils

Package Overview
Dependencies
5
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rating-utils

library of helper methods for rating insurance policies


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
4.38 MB
Created
Weekly downloads
 

Readme

Source

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.

Keywords

FAQs

Last updated on 21 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc