Open liusong1111 opened 4 years ago
If target is es6, lots of functions are supported by browser natively, and lodash may be unnecessary. Remove lodash can reduce package size, faster speed, and better code readability.
Refs: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscor
But remove lodash need more caution to ensure that will not introduce compability issues.
const contactIndex = _.findIndex(contacts, function (contactItem) {
return contactItem.address === currentAddress;
});
if (contactIndex > -1) {
setName(contacts[contactIndex].name);
}
https://github.com/liusong1111/synapse-extension/blob/328abb2da00d949fffaabc9ac63dfedcd484b3b0/tsconfig.json#L2-L19