Skip to content

allow easy data editing via callback #133

Open
@mknj

Description

@mknj

Motivation

I want to change all found elements via a callback. (i.e. rewrite $ref: )
other libraries have an apply(...,callback) method, that allows to change values easily by updating the value with the callback return value.

Current behavior

In this example I want to double all found values.

{ callback: (v,_dummy,p)=>p.parent[p.parentProperty]=v*2 }

This syntax is especially bad if you work with typescript and eslint no_unused_var

Desired behavior

{ applycb: (v)=>v*2 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions