B2G/gecko/dom/mobilemessage/src/ril/WspPduHelper.jsm
/**
   * @param data
   *        A wrapped object containing raw PDU data.
   *
   * @return A decoded object containing `name` and `value` properties or null
   *         if something wrong. The `name` property must be a string, but the
   *         `value` property can be many different types depending on `name`.
   */
@param data
A wrapped object containing raw PDU data.

@return A decoded object containing `name` and `value` properties or null
if something wrong.
@param data A wrapped object containing raw PDU data . @return A decoded object containing ` name ` and ` value ` properties or null if something wrong .
function decode(data) {
    let begin = data.offset;
    try {
      return this.decodeTypedParameter(data);
    } catch (e) {
      data.offset = begin;
      return this.decodeUntypedParameter(data);
    }
  }
function decode ( data ) { let begin = data . offset ; try { return this . decodeTypedParameter ( data ) ; } catch ( e ) { data . offset = begin ; return this . decodeUntypedParameter ( data ) ; } }
@param data
        A wrapped object containing raw PDU data.
@param data A wrapped object containing raw PDU data .