B2G/gecko/dom/mobilemessage/src/ril/WspPduHelper.jsm
/**
   * @param data
   *        A wrapped object to store encoded raw data.
   * @param value
   *        An integer value or an octet array of less-equal than 31 elements.
   */
@param data
A wrapped object to store encoded raw data.
@param value
An integer value or an octet array of less-equal than 31 elements.
@param data A wrapped object to store encoded raw data . @param value An integer value or an octet array of less - equal than 31 elements .
function encode(data, value) {
    if (typeof value === "number") {
      encodeAlternatives(data, value, null, ShortInteger, LongInteger);
    } else if (Array.isArray(value) || (value instanceof Uint8Array)) {
      LongInteger.encode(data, value);
    } else {
      throw new CodeError("Integer-Value: invalid value type");
    }
  }
function encode ( data , value ) { if ( typeof value === "number" ) { encodeAlternatives ( data , value , null , ShortInteger , LongInteger ) ; } else if ( Array . isArray ( value ) || ( value instanceof Uint8Array ) ) { LongInteger . encode ( data , value ) ; } else { throw new CodeError ( "Integer-Value: invalid value type" ) ; } }
@param data
        A wrapped object to store encoded raw data.
@param data A wrapped object to store encoded raw data .