If you are using a non-standard (harmony) expectation in your library you 
should test and bail on an environment that does not supply the interfaces 
expected. I think throwing on missing expectations is one solution the 
other is to require a shim if the expectation is not present. Both are 
pretty de-facto in JS. Putting this into package.json etc would mean that 
you are requiring CLI switches that are non-standard to be in place. 
Shimming and throwing are perfectly valid for this case.

I see this as little difference from requiring a peer module or a module 
that expects a non-present global variable (lots of tests suites bootstrap 
in globals, errors are usually but not always obvious due to this).

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to