Skip to content

Commit

Permalink
use lodash/reduce replace lodash import
Browse files Browse the repository at this point in the history
  • Loading branch information
someok committed Sep 22, 2020
1 parent 9110ef2 commit 7c0ff46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import fs from './fs'
import getUUID from './utils/uuid'
import base64 from 'base-64'
import polyfill from './polyfill'
import _ from 'lodash'
import reduce from 'lodash/reduce'
import android from './android'
import ios from './ios'
import JSONStream from './json-stream'
Expand Down Expand Up @@ -224,7 +224,7 @@ function fetch(...args:any):Promise {

// # 241 normalize null or undefined headers, in case nil or null string
// pass to native context
headers = _.reduce(headers, (result, value, key) => {
headers = reduce(headers, (result, value, key) => {
result[key] = value || ''
return result
}, {});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"dependencies": {
"base-64": "0.1.0",
"glob": "7.0.6"
"glob": "7.0.6",
"lodash": "4.17.15"
},
"keywords": [
"react-native",
Expand Down

0 comments on commit 7c0ff46

Please sign in to comment.