Skip to content

Commit e3d86ee

Browse files
committed
Remove lodash import
In this instance lodash does not simplify the code and leads to a ~70kb increase in minified bundle size
1 parent 6923bbb commit e3d86ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import fs from './fs'
2121
import getUUID from './utils/uuid'
2222
import base64 from 'base-64'
2323
import polyfill from './polyfill'
24-
import _ from 'lodash'
2524
import android from './android'
2625
import ios from './ios'
2726
import JSONStream from './json-stream'
@@ -224,8 +223,8 @@ function fetch(...args:any):Promise {
224223

225224
// # 241 normalize null or undefined headers, in case nil or null string
226225
// pass to native context
227-
headers = _.reduce(headers, (result, value, key) => {
228-
result[key] = value || ''
226+
headers = Object.keys(headers).reduce((result, key) => {
227+
result[key] = headers[key] || ''
229228
return result
230229
}, {});
231230

0 commit comments

Comments
 (0)