I've seen that code in open source projects and I wonder what is its intent:
'use strict';
function invariant(condition, message) {
if (!condition) {
throw new Error(message);
}
}
(0, invariant)(false, 'failed');
Is this done to disable assertions? If it is, then I was unable to figure out how.