-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imported only lodash submodules #2033
Conversation
const tags = _(availableTags).map('tags').flatten().value(); | ||
let tagKeys = _(tags).map('key').uniq().value(); | ||
tagKeys = _.filter(tagKeys, function calc(o) { | ||
const tags = _map(availableTags).map('tags').flatten().value(); | ||
let tagKeys = _map(tags).map('key').uniq().value(); | ||
tagKeys = _map.filter(tagKeys, function calc(o) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren't only using the _map
submodule here. Others are also used like _uniq
, _flatter
, _concat
.
A changed syntax would be something like:
const tags = _flatten(_map(availableTags, 'tags'));
let tagKeys = _uniq(_map(tags, 'key'));
...etc
Signed-off-by: MeenuyD <[email protected]>
Signed-off-by: MeenuyD <[email protected]>
It will go faster if you run yarn lint/test locally before submitting |
const tags = _flatten(availableTags).map('tags').flatten().value(); | ||
let tagKeys = _uniq(tags).map('key').uniq().value(); | ||
tagKeys = _map.filter(tagKeys, function calc(o) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have messed up the whole thing here. I think you should take the reference of official lodash docs for better understanding.
const tags = _flatten(allSpans).map('tags').flatten().value(); | ||
const tagKeys = _uniq(tags).map('key').uniq().value(); | ||
const values = _concat.concat(serviceName, operationName, tagKeys); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
const temp = _.chain(allSpans) | ||
const temp = _get.chain(allSpans) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chain
is not a function provided by _get
, rather is a submodule itself. Please check the comments above ^
I moved to files that were changed correctly into another PR, already merged. |
Ok thank you |
addressed in #2041 |
Imported only lodash submodules
#2032