1 |
|
2 | var thenx= require('./thenx')
|
3 |
|
4 | var whenx= function(_wx= {}){
|
5 | for(let k in wx){
|
6 | if(typeof(wx[k]) === 'function'){
|
7 | // console.info(`func: ${k}`)
|
8 | _wx[k]= (v)=> thenx.call(this, k, v)
|
9 | }
|
10 | else{
|
11 | // console.info(`val: ${k}`)
|
12 | _wx[k]= wx[k]
|
13 | }
|
14 | }
|
15 | return _wx
|
16 | }()
|
17 |
|
18 | /**
|
19 | * @desc
|
20 | * @module Object
|
21 | * @return {object}
|
22 | */
|
23 | module.exports= whenx
|