ects-yevhen-dobrianskyi
v1.0.1
Published
This package implements conversion scores from the 100-point grading system to the ECTS format.
Downloads
1
Readme
Practical task
You need to implement an npm package that converts scores from the 100-point grading system to the ECTS format.
To achieve this, your package should include a class called ECTS, which you will export. The constructor of this class should accept one parameter, which is the score in the 100-point format. Additionally, the class should have a method called ectsFromScore() that will return the corresponding ECTS value for the given score.
The score-to-ECTS conversion ratios are provided in the table.
Publish the created module on npm and write its name in the name.txt file. You need to push only name.txt as the result of this task. Do not make any changes to other files in this repository. You can create another repository for code of your package. Tests will retrieve your published package from npm.
Name your package in the format ects-your-full-name because npm does not allow two packages with the same name.
How to test localy
Publish your package and write name of it in name.txt.
On Unix-systems follow next steps:
- Navigate to the root directory of this project.
- Run
chmod +x .github/workflows/test.sh
- Run
./.github/workflows/test.sh
For Windows, you have two options:
- Use the prepared .bat script. Run the following command from the root directory of this project:
.\.github\workflows\test.bat
- Alternatively, use the Git Bash terminal and follow instructions for Unix-systems
After testing, you will see the created package.json
file. Remember that you should not push it to GitHub in this task (do not delete anything from .gitignore)