Files
shaka-player/lib/debug/asserts.js
T
Joey Parrish f539147d48 fix: Correct license headers in compiled output
This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.

It seems that the `!` in the header forces the compiler to keep it in
the output.  I believe older compiler releases did this purely based
on `@license`.

Issue #2638

Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
2020-06-09 16:05:09 -07:00

38 lines
848 B
JavaScript

/*! @license
* Shaka Player
* Copyright 2016 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
goog.provide('goog.asserts');
/**
* @summary An assertion framework which is compiled out for deployment.
* NOTE: this is not the closure library version. This uses the same name so
* the closure compiler will be able to use the conditions to assist type
* checking.
*/
goog.asserts = class {
/**
* @param {*} val
* @param {string} message
*/
static assert(val, message) {}
};
/**
* @define {boolean} true to enable asserts, false otherwise.
*/
goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
// Install assert functions.
if (goog.asserts.ENABLE_ASSERTS) {
if (console.assert && console.assert.bind) {
// eslint-disable-next-line no-restricted-syntax
goog.asserts.assert = console.assert.bind(console);
}
}