I've created angular-cli project. I want to add https://www.npmjs.com/package/js-sha1 so I used command.
npm install js-sha1 ---save
How should I import it then to be able to use it? I'm trying to import it as:
import 'js-sha1';
But when I do:
sha1('Message to hash');
it says it doesn't know what sha1 is.
Try using
import * as sha1 from 'js-sha1';
for your import.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With