promixy
A module help you make sync calling chain on Promise. Talk is cheap, show you the code.
Note
This module only can run in Node 6.x because it use Proxy
.
Usage
Get and Apply
You can use it like:
var _ = ; a0 ;
If you want get the origin promise object just use a.__promise
,
if you want get the calling chain just use a.__chainPath
,
otherwise promixy object always return a Proxy
with Promise
,
so must attention if you want get the value of Promise
, you always must use .then
.
Set
You can set property value to promixy like that:
var a = ;var b = ab;var x = abc; abc = 456; a;b;x; //{ b: { c: { as: 456 } } }//{ c: { as: 456 } }//123
Options
You can set default value through require('promixy').setDefault
like that:
var _ = ;
methods
If you use some module like bluebird
that provide many method to Promise, you can choose what method can use on promixy.
Promise
You can define what Promise Library that promixy use.