Skip to content

[Feature request] Add . (dot) or other symbol(s) as variable reference in assignment block #180

Closed
@demark

Description

@demark

Currently we have this sugar: some.long.long.long.variable .= to-upper-case!

But we often have a lot of functions from some libs that takes var as argument and returns new value.

I suggest to add . (dot) as variable reference in the assignment block:

some.long.long.long.variable = '<b>hello</b> world!'

some-external-lib.sanitize = (s) -> s.replace /<\/?[^>]+>/g, ''

some.long.long.long.variable =  some-external-lib.sanitize .
                                .replace /\s+/g, '_'
                                .to-upper-case!

And we can use some.long.long.long.variable = . .to-upper-case!

Maybe instead of dot use &. or $& (like in regex)

I think this will be very usable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions