#1118 - Partial Locale update added
In case of Object we would be using Object.assign to enable partial update of the locale property. fixes #1118
Codecov Report
Merging #1122 (ea62024) into dev (e2feb6b) will decrease coverage by
0.05%. The diff coverage is90.90%.
@@ Coverage Diff @@
## dev #1122 +/- ##
===========================================
- Coverage 100.00% 99.94% -0.06%
===========================================
Files 177 178 +1
Lines 1989 1999 +10
Branches 505 507 +2
===========================================
+ Hits 1989 1998 +9
- Misses 0 1 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/plugin/updateLocale/utils.js | 90.00% <90.00%> (ø) |
|
| src/plugin/updateLocale/index.js | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update e2feb6b...ea62024. Read the comment docs.
Thanks. It will be better not using Object.assign, cause babel will bundle a huge polyfill to make it work on old browsers.
does spread add something in babel? eg.
{...localeConfig[c], ...customConfig[c]}
or do we need a helper function like:
function m(o1,o2){
var o = {};
for (var attrname in o1) { o[attrname] = o1[attrname]; }
for (var attrname in o2) { o[attrname] = o2[attrname]; }
return o;
}
or do we need those as recursive functions?
It's not about the syntax itself, but the whole bundle size while compiling it to es5.
@iamkun looking for review. I have replaced Object.assign with custom extend method
Thanks, would you please move the utils function to the plugin file?
Thanks, would you please move the utils function to the plugin file?
Done @iamkun
sorry that I didn't make it clear, what I mean is to move the extend function to src/plugin/updateLocale/index.js or maybe src/plugin/updateLocale/utils.js
sorry that I didn't make it clear, what I mean is to move the extend function to
src/plugin/updateLocale/index.jsor maybesrc/plugin/updateLocale/utils.js
Done @iamkun
LGTM, would you like to add some unit tests for this feature?
@iamkun Not sure why this got away in my checklist. I have updated the unit test cases now.