Adding a pure JS library to Ionic using NPM

I’m trying to include one of these :



To my Ionic app to be able to transform gregorian dates to hebrew calendar and the other way around.

I’m having a very hard time understanding how to import a script like this (that is pure JS) to my app. I tried to follow Ionic’s tutorial and looked all over the web but didn’t seem to find anything concrete. When following the tutorial, I add

import HeDate from 'he-date';

for example to my component, but new HeDate() can’t be used after that so I guess something is missing.

What I mostly want to understand : how to add ANY pure JS to an angular app ?

I finally succeeded having it work by following these steps :… BUT I’m sure it’s not the right way to do it.