babel/packages/babel-helper-simple-access
Justin Ridgewell 34d73ebef0
Correct update expression Number coercion (#7766)
* Correct update expression Number coercion

You have to `ToNumber` whatever the `UpdateExpression` argument is.

* Fix systemjs update expression
2018-04-22 13:50:11 -04:00
..
2018-04-02 18:19:30 -04:00

@babel/helper-simple-assignment

There are many cases where it is hard to perform transformations because a piece of code is using complex structures. Say you want to rewrite all accesses to a given variable, and there are cases like

i += 1
--i;

It is difficult to work with.

This helper can handle converting these to simple access patterns of standard assignment. This plugin does not handle

{ a } = foo;

so assignment to patterns still needs to be handled when you are processing updates to values.

Usage

TODO