Skip to content

Commit

Permalink
remove dependency on assert (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
joenoon authored and aksonov committed May 19, 2016
1 parent cd3767a commit 3836299
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
}
],
"dependencies": {
"assert": "^1.3.0",
"react-native-tabs": "^1.0.2"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*
*/
import assert from 'assert';
import { assert } from './Util';
import Scene from './Scene';
export const JUMP_ACTION = 'jump';
export const PUSH_ACTION = 'push';
Expand Down
2 changes: 1 addition & 1 deletion src/Reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
REFRESH_ACTION,
} from './Actions';

import assert from 'assert';
import { assert } from './Util';
import { getInitialState } from './State';

// WARN: it is not working correct. rewrite it.
Expand Down
2 changes: 1 addition & 1 deletion src/State.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*
*/
import assert from 'assert';
import { assert } from './Util';

function getStateFromScenes(route, scenes, props) {
const getters = [];
Expand Down
5 changes: 5 additions & 0 deletions src/Util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export function assert(expr, failDescription) {
if (!expr) {
throw new Error(`[react-native-router-flux] ${failDescription}`);
}
}

0 comments on commit 3836299

Please sign in to comment.