Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 4178e72

Browse files
committed
Use lodash/* over lodash.* packages. Slight reduction in bundle size.
1 parent 567d1cb commit 4178e72

File tree

5 files changed

+9
-27
lines changed

5 files changed

+9
-27
lines changed

package-lock.json

Lines changed: 3 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@
138138
"@ethersproject/web": "^5.0.13",
139139
"debug": "^4.3.2",
140140
"eventemitter3": "^4.0.7",
141-
"lodash.uniqueid": "^4.0.1",
142-
"lodash.has": "^4.0.1",
143-
"lodash.get": "^4.0.1",
144-
"lodash.set": "^4.0.1",
141+
"lodash": "^4.17.21",
145142
"mem": "^8.0.0",
146143
"node-abort-controller": "^1.1.0",
147144
"node-fetch": "^2.6.1",

src/Config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { ConnectionInfo } from '@ethersproject/web'
1111
import { EthereumAddress, Todo } from './types'
1212
import { BytesLike } from '@ethersproject/bytes'
1313
import { isAddress } from '@ethersproject/address'
14-
import has from 'lodash.has'
15-
import get from 'lodash.get'
14+
import has from 'lodash/has'
15+
import get from 'lodash/get'
1616

1717
export type EthereumConfig = ExternalProvider|JsonRpcFetchFunc
1818

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { inspect } from 'util'
22
import EventEmitter from 'events'
33

44
import { v4 as uuidv4 } from 'uuid'
5-
import uniqueId from 'lodash.uniqueid'
5+
import uniqueId from 'lodash/uniqueId'
66
import pMemoize from 'p-memoize'
77
import pLimit from 'p-limit'
88
import mem from 'mem'

test/unit/Config.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import set from 'lodash/set'
12
import { arrayify, BytesLike } from '@ethersproject/bytes'
3+
24
import { StreamrClient } from '../../src/StreamrClient'
3-
import set from 'lodash.set'
45

56
describe('Config', () => {
6-
77
describe('validate ethereum addresses', () => {
88
const createClient = (propertyPaths: string, value: string|undefined|null) => {
99
const opts: any = {}

0 commit comments

Comments
 (0)