1.0.2 • Published 3 years ago

gst-utils v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

GST Utils

Basic utilities for adding, subtracting and getting GST from a value. Has some simple sanitisation to strip out non numeric characters and always return a number.

Installation

npm install gst-utils

Usage

import useGst from 'gst-utils';

const myValue = 100;

const { gst, amountInclusive, amountExclusive } = useGst(myValue);

console.log(gst) // 13.04
console.log(amountInclusive) // 115
console.log(amountExclusive) // 86.96

Example

Visit nzgst.netlify.app