Skip to content

Commit

Permalink
Merge pull request #210 from chaffeqa/feature/reduce-lodash-footprint
Browse files Browse the repository at this point in the history
Minimize Lodash Footprint
  • Loading branch information
zbeyens committed Jul 19, 2020
2 parents 6440b13 + 97ed672 commit 1030b7a
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SlatePlugin } from '@udecode/slate-plugins-core';
import { castArray } from 'lodash';
import castArray from 'lodash/castArray';
import { Editor } from 'slate';

export interface WithInlineVoidOptions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { castArray } from 'lodash';
import castArray from 'lodash/castArray';
import { Editor } from 'slate';
import { EditorNodesOptions } from '../types/Editor.types';
import { getNodes } from './getNodes';
Expand Down
3 changes: 2 additions & 1 deletion packages/slate-plugins/src/common/queries/getPointBefore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-constant-condition */
import { castArray, map } from 'lodash';
import castArray from 'lodash/castArray';
import map from 'lodash/map';
import { Editor, Location, Path, Point } from 'slate';

export interface BeforeOptions {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { merge } from 'lodash';
import merge from 'lodash/merge';
import { Descendant, Node, NodeEntry } from 'slate';
import { isAncestor, isNodeType } from '../queries';
import { QueryOptions } from '../types/QueryOptions.types';
Expand Down
2 changes: 1 addition & 1 deletion packages/slate-plugins/src/common/transforms/toggleMark.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { castArray } from 'lodash';
import castArray from 'lodash/castArray';
import { Editor } from 'slate';
import { isMarkActive } from '../queries/isMarkActive';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { castArray } from 'lodash';
import castArray from 'lodash/castArray';
import { Editor, Transforms } from 'slate';
import { WrapOptions } from '../types/Transforms.types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeserializeNode } from '@udecode/slate-plugins-core';
import { castArray } from 'lodash';
import castArray from 'lodash/castArray';

export interface GetNodeDeserializerRule {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { pickBy } from 'lodash';
import pickBy from 'lodash/pickBy';
import { RenderElementProps } from 'slate-react';
import { RenderNodeOptions } from '../types/PluginOptions.types';

Expand Down
2 changes: 1 addition & 1 deletion packages/slate-plugins/src/common/utils/getRenderLeaf.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { pickBy } from 'lodash';
import pickBy from 'lodash/pickBy';
import { RenderLeafProps } from 'slate-react';
import { RenderNodeOptions } from '../types/PluginOptions.types';

Expand Down
2 changes: 1 addition & 1 deletion packages/slate-plugins/src/common/utils/setDefaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defaultsDeep } from 'lodash';
import defaultsDeep from 'lodash/defaultsDeep';

/**
* Deep merge the default object properties that are not defined in the destination object.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { castArray } from 'lodash';
import castArray from 'lodash/castArray';
import { Editor, Range } from 'slate';
import { getRangeFromBlockStart } from '../../common/queries';
import { getText } from '../../common/queries/getText';
Expand Down

0 comments on commit 1030b7a

Please sign in to comment.