Skip to content
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

replace lodash.* dependencies #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"lodash.camelcase": "^4.3.0",
"lodash.isequalwith": "^4.4.0",
"lodash.shuffle": "^4.2.0",
"lodash.omit": "^4.5.0",
"mocha": "^3.2.0",
"node-notifier": "^4.6.1",
"rc-slider": "^5.4.3",
Expand All @@ -62,11 +63,10 @@
"webpack": "^1.14.0"
},
"dependencies": {
"debounce": "^1.0.0",
"enquire.js": "^2.1.1",
"imagesloaded": "^4.1.1",
"lodash.debounce": "^4.0.8",
"lodash.omit": "^4.5.0",
"lodash.partition": "^4.6.0",
"just-omit": "^1.0.1",
"react-addons-transition-group": "^15.4.2",
"react-motion": "^0.4.7",
"shallowequal": "^0.2.2"
Expand Down
2 changes: 1 addition & 1 deletion src/components/CSSGrid.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import ReactTransitionGroup from 'react-addons-transition-group';
import shallowEqual from 'shallowequal';
import omit from 'lodash.omit';
import omit from 'just-omit';
import { commonPropTypes, commonDefaultProps } from '../utils/commonProps';
import { cubicOut } from '../utils/easings';
import assertIsElement from '../utils/assertIsElement';
Expand Down
2 changes: 1 addition & 1 deletion src/components/CSSGridItem.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import shallowEqual from 'shallowequal';
import omit from 'lodash.omit';
import omit from 'just-omit';
import { buildTransform, positionToProperties } from '../utils/transformHelpers';

export default class extends Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/SpringGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { TransitionMotion, spring } from 'react-motion';
import stripStyle from 'react-motion/lib/stripStyle';
import shallowEqual from 'shallowequal';
import omit from 'lodash.omit';
import omit from 'just-omit';
import { buildTransform, positionToProperties } from '../utils/transformHelpers';
import { commonPropTypes, commonDefaultProps } from '../utils/commonProps';
import assertIsElement from '../utils/assertIsElement';
Expand Down
9 changes: 4 additions & 5 deletions src/higher-order-components/measureItems.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import partition from 'lodash.partition';
import debounce from 'lodash.debounce';
import debounce from 'debounce';
import { commonDefaultProps } from '../utils/commonProps';

const imagesLoaded = typeof window !== 'undefined' ? require('imagesloaded') : null;
Expand Down Expand Up @@ -93,9 +92,9 @@ export default (Grid, { measureImages, background } = {}) => class extends Compo
render() {
const { component } = this.props;

const [newElements, existingElements] = partition(
React.Children.toArray(this.props.children),
element => !this.state.rects[element.key]);
const children = React.Children.toArray(this.props.children);
const newElements = children.filter(element => !this.state.rects[element.key]);
const existingElements = children.filter(element => this.state.rects[element.key]);

const elementsToMeasure = newElements.map(element =>
React.cloneElement(element, {
Expand Down