Skip to content

Commit 7c0ff46

Browse files
committed
use lodash/reduce replace lodash import
1 parent 9110ef2 commit 7c0ff46

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ 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'
24+
import reduce from 'lodash/reduce'
2525
import android from './android'
2626
import ios from './ios'
2727
import JSONStream from './json-stream'
@@ -224,7 +224,7 @@ function fetch(...args:any):Promise {
224224

225225
// # 241 normalize null or undefined headers, in case nil or null string
226226
// pass to native context
227-
headers = _.reduce(headers, (result, value, key) => {
227+
headers = reduce(headers, (result, value, key) => {
228228
result[key] = value || ''
229229
return result
230230
}, {});

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
},
99
"dependencies": {
1010
"base-64": "0.1.0",
11-
"glob": "7.0.6"
11+
"glob": "7.0.6",
12+
"lodash": "4.17.15"
1213
},
1314
"keywords": [
1415
"react-native",

0 commit comments

Comments
 (0)