From 2e37f65bdcae1f12eced79984474a54970865be0 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Fri, 26 Jul 2013 11:22:56 -0700 Subject: [PATCH] Delete `throwIf` Deletes `throwIf()` in favor of having one way to throw errors: `invariant()` --- src/utils/throwIf.js | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 src/utils/throwIf.js diff --git a/src/utils/throwIf.js b/src/utils/throwIf.js deleted file mode 100644 index fc2decca07..0000000000 --- a/src/utils/throwIf.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright 2013 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule throwIf - */ - -"use strict"; - -var throwIf = function(condition, err) { - if (condition) { - throw new Error(err); - } -}; - -module.exports = throwIf;