node/examples/mesh-sender.js
function(callback){
      ubeacon.getMeshSettingsRegisterObject( function(data, error){

        if( error === null ){
          meshSettings.setFrom( data );
          console.log( 'meshSettings: ', meshSettings );
          if( meshSettings.enabled !== true && program.enableMesh !== true ){
            return callback(new Error('Mesh is disabled on device. Enable it by adding `--enable-mesh` parameter.'));
          }
          return callback(null);
        }else{
          return callback(error);
        }
      });
    }
function(callback){
      ubeacon.getMeshSettingsRegisterObject( function(data, error){

        if( error === null ){
          meshSettings.setFrom( data );
          console.log( 'meshSettings: ', meshSettings );
          if( meshSettings.enabled !== true && program.enableMesh !== true ){
            return callback(new Error('Mesh is disabled on device. Enable it by adding `--enable-mesh` parameter.'));
          }
          return callback(null);
        }else{
          return callback(error);
        }
      });
    }
function ( callback ) { ubeacon . getMeshSettingsRegisterObject ( function ( data , error ) { if ( error === null ) { meshSettings . setFrom ( data ) ; console . log ( 'meshSettings: ' , meshSettings ) ; if ( meshSettings . enabled !== true && program . enableMesh !== true ) { return callback ( new Error ( 'Mesh is disabled on device. Enable it by adding `--enable-mesh` parameter.' ) ) ; } return callback ( null ) ; } else { return callback ( error ) ; } } ) ; }
Check if mesh is enabled
Check if mesh is enabled