reverse-execution
npm package
Inspiration
Sometimes we need to convert from a callback function to Promise and we need to change the parameter ordering of their's callback. Because Promise's callback use second parameter to handle error and Callback-style is backwards. So I decided to write this function to help us.
Example:
var p = { something}
Now it's easier:
var p = something;
Installation
npm install reverse-execution
Example:
// Normal function { console; const words = Arrayprototypeslice; return words;} ; // return 'one_two_three' const concatWord_RE = ; // return 'three_two_one';
Bugs?
This is my first public package on NPM. If you found any bugs please create a pull request. Many thanks :)