Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code "will not work in any environment" #19

Open
softwud opened this issue Aug 28, 2021 · 0 comments
Open

Code "will not work in any environment" #19

softwud opened this issue Aug 28, 2021 · 0 comments

Comments

@softwud
Copy link

softwud commented Aug 28, 2021

Firstly thank you for doing all this hard work to make using uuids easy to generate. Very much appreciated!

I just tried to use Version 1.6.2 of your code in a NetSuite environment which is a essentially a Mozilla javascript engine written in Java that supports only very old version of javascript (well before the advent of modern Node). As such the buffer type doesn't exist.

This is fine since it can be polyfilled, however I am having an issue where this error is raised on line 701 of the uuid.js file.

org.mozilla.javascript.EcmaError: ReferenceError: "Buffer" is not defined.

Perhaps in a future version rather than a simple "if (Buffer)" you could implement a safe method like the typeof line above so that the code will fall through to the else clause and still have a chance of working?!

Otherwise great job!

Thanks.

Paolo
SoftWUD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant