1.6.1 • Published 11 months ago

@normalfinance/utils v1.6.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
11 months ago

Logo

Normal Utils

A Typescript modules for frequently used types, utilities, constants, and more across Normal repositories.

Installation

yarn add @normalfinance/utils

or

npm install @normalfinance/utils

Usage

Using a database table type:

import { NewInvestment } from '@normalfinance/utils';

const myNewInvestment: NewInvestment = {
   idempotencyKey: 'xyz',
   userId: '123',
   exchangeId: 1;
   indexId: 2;
   amount: '125',
   currency: "usd",
   feeStatus: "pending"
}

Calculating an investment fee:

import { calculateIndexFee } from '@normalfinance/utils';

const totalInvestmentsSoFar = 1000;
const newInvestment = 500;

const indexFee = calculateIndexFee(totalInvestmentsSoFar, newInvesment);

Contributing

Setup

  • Install the current LTS version of Node.js
    • If you are using nvm (recommended) running nvm install will install the latest version and running nvm use will automatically choose the right node version for you.
  • Install Yarn v3
  • Run yarn install to install dependencies and run any required post-install scripts

Testing and Linting

Run yarn test to run the tests once. To run tests on file changes, run yarn test:watch.

Run yarn lint to run the linter, or run yarn lint:fix to run the linter and fix any automatically fixable issues.

Release & Publishing

Coming soon.

1.2.0

1 year ago

1.6.1

11 months ago

1.6.0

11 months ago

1.4.0

1 year ago

1.5.9

11 months ago

1.5.8

1 year ago

1.5.7

1 year ago

1.5.6

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.3.5

1 year ago

1.5.2

1 year ago

1.3.4

1 year ago

1.5.1

1 year ago

1.3.3

1 year ago

1.5.0

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.3

1 year ago

1.0.0

1 year ago

0.0.31

1 year ago

0.0.32

1 year ago

0.0.20

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.25

1 year ago

0.0.19

1 year ago

0.0.30

1 year ago

0.0.26

1 year ago

0.0.27

1 year ago

0.0.28

1 year ago

0.0.29

1 year ago

0.0.17

1 year ago

0.0.18

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

0.0.0

1 year ago