Frontmatter
| id | 2443 |
| title | Spreading default values |
| state | Closed |
| labels | enhancement |
| assignees | tobiu |
| createdAt | Jun 21, 2021, 6:51 PM |
| updatedAt | Jun 21, 2021, 7:11 PM |
| githubUrl | https://github.com/neomjs/neo/issues/2443 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jun 21, 2021, 7:11 PM |
I am using the spread operator a lot:
let foo = {a:1, ...fooDefaults || {}}I just noticed that it is a valid operation to spread null:
let foo = {a:1, ...null}so we can reduce the code base a bit removing the
|| {}parts.