Extracts the value from the data object
@param  {Object} data Data value containing the info
@return {String}      Value to show
341102
function getValueText(data) {
            let value = data[valueLabel];
            let valueText;

            if (data.missingValue) {
                valueText = '-';
            } else {
                valueText = getFormattedValue(value).toString();
            }

            return valueText;
        }
162643
function parse_description(str, data) {
        if (data.errors && data.errors.length) { return null; }

        var result = str.match(/^\s+([\s\S]+)?/);

        if (result) {
          return {
            source: result[0],
            data: {description: result[1] === undefined ? '' : result[1].replace(trimNewlineRegex, '')}
          };
        }

        return null;
      }
1087180
function(data) {

    var _mode = QRMode.MODE_NUMBER;
    var _data = data;

    var _this = {};

    _this.getMode = function() {
      return _mode;
    };

    _this.getLength = function(buffer) {
      return _data.length;
    };

    _this.write = function(buffer) {

      var data = _data;

      var i = 0;

      while (i + 2 < data.length) {
        buffer.put(strToNum(data.substring(i, i + 3) ), 10);
        i += 3;
      }

      if (i < data.length) {
        if (data.length - i == 1) {
          buffer.put(strToNum(data.substring(i, i + 1) ), 4);
        } else if (data.length - i == 2) {
          buffer.put(strToNum(data.substring(i, i + 2) ), 7);
        }
      }
    };

    var strToNum = function(s) {
      var num = 0;
      for (var i = 0; i < s.length; i += 1) {
        num = num * 10 + chatToNum(s.charAt(i) );
      }
      return num;
    };

    var chatToNum = function(c) {
      if ('0' <= c && c <= '9') {
        return c.charCodeAt(0) - '0'.charCodeAt(0);
      }
      throw 'illegal char :' + c;
    };

    return _this;
  }
691944
function data(element) {
            var options = {}
            Util.each(element.attributes, function(attribute) {
                var ma = /data-(.+)/.exec(attribute.name)
                if (!ma) return

                var value = attribute.value
                try {
                    /* jshint evil:true */
                    options[ma[1]] = /^\s*[\[{]/.test(value) ?
                        eval('(function(){ return Array.prototype.slice.call(arguments)[0] })(' + value + ')') :
                        value
                } catch (error) {
                    options[ma[1]] = value
                }

                if (options[ma[1]] === 'true') options[ma[1]] = true
                if (options[ma[1]] === 'false') options[ma[1]] = false
            })
            return options
        }
993185
function extractUnicodeValues( $data )
    {
        $type = $data['type'];
        if ( $type == 'string' )
        {
            return $this->ISOUnicodeCodec->convertString( $data['value'] );
        }
        else if ( $type == 'ascii' )
        {
            return array( $data['value'] );
        }
        else if ( $type == 'unicode' )
        {
            return array( $data['value'] );
        }
        else if ( $type == 'remove' )
        {
            return array( false );
        }
        else if ( $type == 'keep' )
        {
            return array( true );
        }
        return array();
    }
336254
function parse(data) {
  try {
    return JSON.parse(data);
  } catch (e) {
    log('Oops! Some problems parsing this ' + (typeof data === 'undefined' ? 'undefined' : _typeof(data)) + '.', 'error', debug);
  }

  return null;
}
839609
function parse(val) {
  if (typeof val === 'number' && !isNaN(val)) {
    return val;
  }

  if (typeof val !== 'string') {
    return null;
  }

  // Test if the string passed is valid
  var results = parseRegExp.exec(val);
  var floatValue;
  var unit = 'b';

  if (!results) {
    // Nothing could be extracted from the given string
    floatValue = parseInt(val, 10);
    unit = 'b'
  } else {
    // Retrieve the value and the unit
    floatValue = parseFloat(results[1]);
    unit = results[4].toLowerCase();
  }

  return Math.floor(map[unit] * floatValue);
}
802248
function getDataType(obj){
	var dataType = toClass.call( obj );
	dataType = dataType.split(' ')[1];
	dataType = dataType.substring(0, dataType.length-1);

	return dataType;
}
1331060
def extract_value(self, data):
        """"""
        errors = []
        if 'id' not in data:
            errors.append('Must have an `id` field')
        if 'type' not in data:
            errors.append('Must have a `type` field')
        elif data['type'] != self.type_:
            errors.append('Invalid `type` specified')

        if errors:
            raise ValidationError(errors)

        # If ``attributes`` is set, we've folded included data into this
        # relationship. Unserialize it if we have a schema set; otherwise we
        # fall back below to old behaviour of only IDs.
        if 'attributes' in data and self.__schema:
            result = self.schema.load({'data': data, 'included': self.root.included_data})
            return result.data if _MARSHMALLOW_VERSION_INFO[0] < 3 else result

        id_value = data.get('id')

        if self.__schema:
            id_value = self.schema.fields['id'].deserialize(id_value)

        return id_value
793177
protected function extractData(array $data)
    {
        $converted = array();

        foreach ($data as $value) {

            if ($value instanceof Result) {

                $converted[$value->getId()] = $value->getData();
            }
        }

        return $converted;
    }
23771
private function extractScriptDataValue_ECMAArray(&$data)
    {
        $result = [];
        if (isset($data[4])) {
            $approximateLength = $this->parseUI32(substr($data, 0, 4));
            $data = substr($data, 4);
            while ($data !== '') {
                $propertyName = $this->extractScriptDataValue_String($data);
                $propertyValue = $this->extractScriptDataValue($data);
                if ($propertyName === '' && $propertyValue === null) {
                    // Object end marker
                    break;
                }
                $result[$propertyName] = $propertyValue;
            }
        }

        return $result;
    }
888652
private Object getValue(String data) {
        Object value = null;
        try {
            //判断是否是日期类型
            Date date = DateUtils.parseDate(data, DATE_PATTERN);
            value = date;
        } catch (ParseException e) {
            //抛异常证明非日期类型
            if ("true".equalsIgnoreCase(data)) {
                value = Boolean.TRUE;
            } else if ("false".equalsIgnoreCase(data)) {
                value = Boolean.FALSE;
            } else {
                //判断是否数字
                try {
                    BigDecimal bd = new BigDecimal(data);
                    if (this.scale == null || this.scale <= 0) {
                        //不四舍五入，直接输出
                        value = data;
                    } else {
                        value = bd.toString().contains(".") ? bd.setScale(this.scale, RoundingMode.HALF_UP).toString() :
                                data;
                    }
                } catch (NumberFormatException e1) {
                    //证明不是数字,直接输出
                    value = data;
                }
            }
        }

        return value;
    }
355818
function(data) {
        var keyMap = this.options.keyMap;
        return $.map(data, function(value) {
            return {
                id: value[keyMap.id],
                title: value[keyMap.title],
                chosen: !!value[keyMap.chosen]
            };
        });
    }
1091066
function getValue(data, path) {
  if (typeof data !== 'object' || data === null) {
    return void 0;
  } else if (path.length === 1) {
    return data[path[0]];
  }
  return getValue(data[path[0]], path.slice(1));
}
1113991
function(data) {
			data = data || {};
			var paramNames = Object.keys(data);
			var buf = [];
			for (var i=0; i < paramNames.length; i++) {
				var param = paramNames[i], value = data[param];
				buf.push(x_www_form_urlencode(param) + '=' + x_www_form_urlencode(value)); //$NON-NLS-0$
			}
			return buf.join('&'); //$NON-NLS-0$
		}
111568
function(data){
    if (data === undefined) {
      data = '';
    }
    $('#message-bar').removeClass('message-success');
    $('#message-bar').addClass('message-fail');

    var val = $('#message-bar').html(data);

    if (this.options.onFailure) {
      this.options.onFailure(data);
    }

    return val;
  }
1090167
function ( obj, key, value ) {
		if ( value !== undefined ) {
			obj.setAttribute( "data-" + key, regex.json_wrap.test( value ) ? json.encode( value ) : value );
			return obj;
		}
		else {
			return utility.coerce( obj.getAttribute( "data-" + key ) );
		}
	}