couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wordit <>
Subject Re: CommonJS syntax help
Date Fri, 05 Oct 2012 16:55:21 GMT
On Fri, Oct 5, 2012 at 8:53 AM, Jim Klo <> wrote:
> What does jsSHA look like?  Does it export something?  I think CommonJS uses exports
vs export.

Oops, typo, googd catch. However, it changes nothing. I think the
problem is related to how jsSHA needs to instantiate a new object
first. From the docs:

"Instantiate a new jsSHA object with your string to be hashed and its
format (HEX or TEXT) as the parameters. Then, call getHash with the
desired hash variant (SHA-1, SHA-224, SHA-256, SHA-384, or SHA-512)
and output type (HEX or B64)
var shaObj = new jsSHA("This is a Test", "TEXT");
var hash = shaObj.getHash("SHA-512", "HEX");"

jsSHA is on Github at:

Is it possible that CommonJS does not allow for this kind of module
usage or is there a workaround?



View raw message