Skip to content

Do not reinvent the wheel. Outsource utility functions. #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@
},
"dependencies": {
"invariant": "^2.0.0",
"warning": "^2.0.0"
"warning": "^2.0.0",
"lodash.isplainobject": "^3.2.0",
"lodash.mapvalues": "^3.0.1",
"lodash.pick": "^3.1.0"
},
"npmName": "redux",
"npmFileMap": [
Expand Down
2 changes: 1 addition & 1 deletion src/createStore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import invariant from 'invariant';
import isPlainObject from './utils/isPlainObject';
import isPlainObject from 'lodash.isplainobject';

/**
* These are private action types reserved by Redux.
Expand Down
2 changes: 1 addition & 1 deletion src/utils/bindActionCreators.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import invariant from 'invariant';
import mapValues from '../utils/mapValues';
import mapValues from 'lodash.mapvalues';

function bindActionCreator(actionCreator, dispatch) {
return (...args) => dispatch(actionCreator(...args));
Expand Down
6 changes: 3 additions & 3 deletions src/utils/combineReducers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ActionTypes } from '../createStore';
import isPlainObject from '../utils/isPlainObject';
import mapValues from '../utils/mapValues';
import pick from '../utils/pick';
import isPlainObject from 'lodash.isplainobject';
import mapValues from 'lodash.mapvalues';
import pick from 'lodash.pick';
import invariant from 'invariant';
import warning from 'warning';

Expand Down
23 changes: 0 additions & 23 deletions src/utils/isPlainObject.js

This file was deleted.

13 changes: 0 additions & 13 deletions src/utils/mapValues.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/utils/pick.js

This file was deleted.

24 changes: 0 additions & 24 deletions test/utils/isPlainObject.spec.js

This file was deleted.

16 changes: 0 additions & 16 deletions test/utils/mapValues.spec.js

This file was deleted.

16 changes: 0 additions & 16 deletions test/utils/pick.spec.js

This file was deleted.