profitlossformulanpm

1.0.0 • Public • Published

What is this?

Get all the profitLoss formulas using this handy npm module.

Installation

npm i profitLossFormulas --save

Then...

import { profitLossFormulas } from 'profitLossFormulas';

// To calculate if there is a profit or loss
let prOrLo = profitLossFormulas().profitOrLoss(sellingPrice,costPrice);
console.log(prOrLo);

// To calculate profit or loss percentage
let prOrLoPercent = profitLossFormulas().profitOrLossPercent(sellingPrice,costPrice);
console.log(prOrLoPercent);

// To calculate if there is a profit or loss
let prOrLo = profitLossFormulas().profitOrLoss(sellingPrice,costPrice);
console.log(prOrLo);

// To calculate selling price when profit occured
let sellingP = profitLossFormulas().sellingPriceWhenProfit(profit,costPrice);
console.log(sellingP); 

// To calculate selling price when loss occured
let sellingP = profitLossFormulas().sellingPriceWhenLoss(loss,costPrice);
console.log(sellingP);

// To calculate cost price when profit occured
let costP = profitLossFormulas().costPriceWhenProfit(profit,sellingPrice);
console.log(costP); 

// To calculate cost price when loss occured
let costP = profitLossFormulas().costPriceWhenLoss(loss,sellingPrice);
console.log(costP);

Readme

Keywords

Package Sidebar

Install

npm i profitlossformulanpm

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

2.79 kB

Total Files

3

Last publish

Collaborators

  • yashmaheshwari696