UNPKG

719 BJavaScriptView Raw
1// @generated
2/**
3 * Copyright (c) 2013-present, Facebook, Inc.
4 * All rights reserved.
5 *
6 * This source code is licensed under the BSD-style license found in the
7 * LICENSE file in the root directory of this source tree. An additional grant
8 * of patent rights can be found in the PATENTS file in the same directory.
9 *
10 *
11 * @fullSyntaxTransform
12 */
13
14'use strict';
15
16var util = require('util');
17
18function invariant(condition, format) {
19 if (!condition) {
20 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
21 args[_key - 2] = arguments[_key];
22 }
23
24 throw new Error(util.format.apply(util, [format].concat(args)));
25 }
26}
27
28module.exports = invariant;
\No newline at end of file