1.0.2 • Published 10 months ago

@mcnoble/interest v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Interest Calculator

A simple and compound interest calculator for JavaScript and Node.js.

Installation

npm install @mcnoble/interest

Usage

// ES6
import simpleInterest from '@mcnoble/interest';
import compoundInterest from '@mcnoble/interest';

// Simple Interest
simpleInterest(principal, rate, time);

// Compound Interest
compoundInterest(principal, rate, time, frequency);

Example

const interest = require('@mcnoble/interest');

// Simple Interest
console.log(simpleInterest(1000, 5, 2)); // 100

// Compound Interest
console.log(compoundInterest(1000, 5, 2, "annually")); // 102.5
1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago