I am installing and using package decimal.js in NodeJS.
This package is described here.
All the examples state that I should be using Decimal. For some reason, it also works when using decimal.
What is the rationale behind this?
I've found a similar question on C# here, which states exactly what I sort of speculated:
The symbol decimal is declared as an alias for Decimal.
Is it the same in NodeJS, and how exactly do you go about aliasing something in JavaScript?
For the record, I am importing the package as follows:
import Decimal from 'decimal.js';
And as already implied, this seems to work just as well:
import decimal from 'decimal.js';