Node package manager supports semantic versioning. To take full advantage of it, you can use the symbols tilde(~) or caret(^).
Tilde(~) means approximately equivalent to version.
In this example
npm install will pick up the latest release of the module
moment starting from
2.29.1 but never
Caret(^) means compatible with version.
Here, the installed version of the module
canvas could range from
2.6.1 to less than
npm ensures the compatibility of your code with the third party module.