We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The JS Tip section could use a bit about mapping and lookup patterns.
For mapping, I'd like to show example usage of array map and reduce, with short simple examples.
For lookups (dictionaries), I'd like to show a lookup pattern to map static values, functions or templates.
This is basically nonsense pseudocode but this is the sort of thing I want to show:
const map = { 'static-key:' 'some-other-value', 'dynamic-key': (v) => v.toUpperCase() } const mapped = patients.map((patient) => { const p = {}; for (key of patient) { const mappedKey = map[key].(key) ?? key; p[mappedKey] = map[patient[key]] ?? patient[key] } return p; });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The JS Tip section could use a bit about mapping and lookup patterns.
For mapping, I'd like to show example usage of array map and reduce, with short simple examples.
For lookups (dictionaries), I'd like to show a lookup pattern to map static values, functions or templates.
This is basically nonsense pseudocode but this is the sort of thing I want to show:
The text was updated successfully, but these errors were encountered: