Skip to content

Instantly share code, notes, and snippets.

@yckart
Last active Aug 29, 2015
Embed
What would you like to do?
Fast property naming, by hand.

Try to rename these properties, right in this kind of fashion:

this._x = this.x;  =>  this.x = this._x;
this._y = this.y;  =>  this.y = this._y;
this._w = this.w;  =>  this.w = this._w;
this._h = this.h;  =>  this.h = this._h;

Read and sort horizontal, as usually.

 this._x = this.x;
 this._y = this.y;
 this._w = this.w;
 this._h = this.h;

Read and sort vertical, as a chinese.

              
this._x = this.x;
this._y = this.y;
this._w = this.w;
this._h = this.h;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment