benchmarks/scenarios/ember.js
function (value, urlKey, defaultValueType) {
      // urlKey isn't used here, but anyone overriding
      // can use it to provide deserialization specific
      // to a certain query param.

      // Use the defaultValueType of the default value (the initial value assigned to a
      // controller query param property), to intelligently deserialize and cast.
      if (defaultValueType === 'boolean') {
        return value === 'true' ? true : false;
      } else if (defaultValueType === 'number') {
        return Number(value).valueOf();
      } else if (defaultValueType === 'array') {
        return _emberRuntimeSystemNative_array.A(JSON.parse(value));
      }
      return value;
    }
function (value, urlKey, defaultValueType) {
      // urlKey isn't used here, but anyone overriding
      // can use it to provide deserialization specific
      // to a certain query param.

      // Use the defaultValueType of the default value (the initial value assigned to a
      // controller query param property), to intelligently deserialize and cast.
      if (defaultValueType === 'boolean') {
        return value === 'true' ? true : false;
      } else if (defaultValueType === 'number') {
        return Number(value).valueOf();
      } else if (defaultValueType === 'array') {
        return _emberRuntimeSystemNative_array.A(JSON.parse(value));
      }
      return value;
    }
function ( value , urlKey , defaultValueType ) { // urlKey isn't used here, but anyone overriding // can use it to provide deserialization specific // to a certain query param. // Use the defaultValueType of the default value (the initial value assigned to a // controller query param property), to intelligently deserialize and cast. if ( defaultValueType === 'boolean' ) { return value === 'true' ? true : false ; } else if ( defaultValueType === 'number' ) { return Number ( value ) . valueOf ( ) ; } else if ( defaultValueType === 'array' ) { return _emberRuntimeSystemNative_array . A ( JSON . parse ( value ) ) ; } return value ; }
Deserializes value of the query parameter based on defaultValueType
@method deserializeQueryParam
@param {Object} value
@param {String} urlKey
@param {String} defaultValueType
@private
Deserializes value of the query parameter based on defaultValueType