Skip to content

Splatted objects #815

Closed
Closed
@satyr

Description

@satyr

We already got splatted arrays [a, b...]. Now how about extending it to objects?

coffee> o = un: 42; console.dir {0: 1, o...}
{ '0': 1, un: 42 }

The compilation of {0: 1, o...} would be something like:

__mix({0: 1}, o)

where __mix is defined as:

(target, source) ->
  target[k] = v for k, v of source
  target

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions