Skip to content

Using as an ES module #82

Open
Open

Description

@paulhiggs

Do you have any suggestions or project updates on how to use this library as an ES module?

I try

import {sha1} from "sha.js"

var hash = sha1("sha1").update("Hello World!").digest("hex");

but always get a message like

TypeError: Cannot read properties of undefined (reading 'init')
    at Sha (D:\Documents\code\dvb-i-tools.maint\node_modules\sha.js\sha.js:22:7)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions