mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-17 16:26:39 +03:00
64896d70b0
This reflects changes in Google's policy on JavaScript license headers, which should be smaller to avoid increasing the size of the binary unnecessarily. This also updates the company name from "Google, Inc" to "Google LLC". Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
37 lines
832 B
JavaScript
37 lines
832 B
JavaScript
/** @license
|
|
* 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);
|
|
}
|
|
}
|