HOME


Mini Shell 1.0
Negocios La Pieza.DO | Registrate o Inicia Sesión

Inicie Sesión en su Cuenta de Negocios

Olvidó Contraseña?
DIR: /var/www/node-app/node_modules/puppeteer-core/src/util/
Upload File :
Current File : //var/www/node-app/node_modules/puppeteer-core/src/util/assert.ts
/**
 * @license
 * Copyright 2020 Google Inc.
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * Asserts that the given value is truthy.
 * @param value - some conditional statement
 * @param message - the error message to throw if the value is not truthy.
 *
 * @internal
 */
export const assert: (value: unknown, message?: string) => asserts value = (
  value,
  message
) => {
  if (!value) {
    throw new Error(message);
  }
};