Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexandrelamberty/banking-lib-demo
:credit_card: Banking library demo package for my FSWD training @ https://technofuturtic.be.
https://github.com/alexandrelamberty/banking-lib-demo
demo library npm npmjs package typescript
Last synced: about 1 month ago
JSON representation
:credit_card: Banking library demo package for my FSWD training @ https://technofuturtic.be.
- Host: GitHub
- URL: https://github.com/alexandrelamberty/banking-lib-demo
- Owner: alexandrelamberty
- License: mit
- Created: 2023-01-29T18:25:00.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-25T20:05:04.000Z (2 months ago)
- Last Synced: 2024-12-09T06:05:24.362Z (about 2 months ago)
- Topics: demo, library, npm, npmjs, package, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@alexandrelamberty/banking-lib-demo
- Size: 912 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Banking Management Library Demo
TypeScript library package demo for school. This project was created with [typescript-starter](https://github.com/bitjson/typescript-starter)
## Usage
Install the library
```shell
npm i @eevos/banking-demo
```Example of creating a Person, CurrentAccount and Bank class instances.
```ts
import {
Bank,
CurrentAccount,
Person,
} from "@eevos/banking-demo";// Create a Person
const person = new Person("Doe", "John", new Date("1978-04-12"));// Create a CurrentAccount associated with the person created, set the credit line and make a deposit
const account = new CurrentAccount("000-111", person);
account.creditLine = 20;
account.deposit(200);// Create a bank and add the account created
const bank = new Bank("My Bank");
bank.addAccount(account);
```Read the docs:
## Development
Clone the library and update the dependencies:
```shell
git clone https://github.com/alexandrelamberty/banking-lib-demo
```execute:
```shell
npm run watch:build
```and / or
```shell
npm run watch:test
```then start implementing features and adding tests...
## Working locally with a project that use the library
Link the library locally with:
```shell
npm link
```In the main project that use the library, link the package library to the project:
```shell
npm link @eevos/banking-demo
```And use anything that will watch your code.
Checkout this post
This will allow the live update of the package in the project that use it.
## Tests
Simply run
```shell
npm run test:unit
```