Created
November 17, 2014 04:40
-
-
Save lamchau/835792a7cbd957e61fc1 to your computer and use it in GitHub Desktop.
Ember.js - Immutable check for production mode (FF4+, IE9+, Chrome 5+; modern browsers)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!Ember.productionMode) { | |
// relies on ember build tools which turn `Ember.assert` into a NOOP | |
Object.defineProperty(Ember, 'productionMode', { | |
value: Ember.assert && Ember.assert.length == 0 | |
}); | |
} | |
// more correct name name | |
// if (!Ember.assertionsEnabled) { | |
// // relies on ember build tools which turn `Ember.assert` into a NOOP | |
// Object.defineProperty(Ember, 'assertionsEnabled', { | |
// value: Ember.assert && Ember.assert.length | |
// }); | |
// } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment