lib/ctr-nodes/index.js
function(dataMap, target) {
      //set defualt is not present
      if (!target) {
        //set init selector values.

        target = Immutable.fromJS({
          selector: self.selector,
          selectorCar: '',
          selectorCdr: '',
          selectorMedia: ''
        });

        const indexId = _H.util._id.gen('index');
        self.initIndex = indexId;
        const data = dataMap.get('static');
        //pick up local option
        const option = dataMap.getIn(['obj', 'option']) || {};
        if (option) {
          dataMap = dataMap.deleteIn(['obj', 'option']);
        }

        target = _T.util.set(Immutable.fromJS({
          key: '',
          data: data,
          option: option,
          type: 'index',
          id: indexId
        }), target);
      }

      return {
        dataMap,
        target
      };
    }
function(dataMap, target) {
      //set defualt is not present
      if (!target) {
        //set init selector values.

        target = Immutable.fromJS({
          selector: self.selector,
          selectorCar: '',
          selectorCdr: '',
          selectorMedia: ''
        });

        const indexId = _H.util._id.gen('index');
        self.initIndex = indexId;
        const data = dataMap.get('static');
        //pick up local option
        const option = dataMap.getIn(['obj', 'option']) || {};
        if (option) {
          dataMap = dataMap.deleteIn(['obj', 'option']);
        }

        target = _T.util.set(Immutable.fromJS({
          key: '',
          data: data,
          option: option,
          type: 'index',
          id: indexId
        }), target);
      }

      return {
        dataMap,
        target
      };
    }
function ( dataMap , target ) { //set defualt is not present if ( ! target ) { //set init selector values. target = Immutable . fromJS ( { selector : self . selector , selectorCar : '' , selectorCdr : '' , selectorMedia : '' } ) ; const indexId = _H . util . _id . gen ( 'index' ) ; self . initIndex = indexId ; const data = dataMap . get ( 'static' ) ; //pick up local option const option = dataMap . getIn ( [ 'obj' , 'option' ] ) || { } ; if ( option ) { dataMap = dataMap . deleteIn ( [ 'obj' , 'option' ] ) ; } target = _T . util . set ( Immutable . fromJS ( { key : '' , data : data , option : option , type : 'index' , id : indexId } ) , target ) ; } return { dataMap , target } ; }
config target
config target