dojo / has

:rocket: Dojo 2 - feature detection library.
http://dojo.io
Other
3 stars 18 forks source link

Add "has('debug')" feature #23

Closed kitsonk closed 8 years ago

kitsonk commented 8 years ago

Type: feature

Description:

This adds a feature named debug which defaults to true. It allows for code paths for code that should only be executed in a debug mode, like providing additional warnings or collecting or emitting diagnostic information.

It is intended that for production builds, this will be disabled by defining a static feature to set the value to false.

This PR also includes tests to validate that features that are defined at run-time can actually be overridden by the definition of a static feature, which was not a test that was being done.

Related Issue: #22