assets/js/bundle.js
/**
 * Class: Buffer
 * =============
 *
 * The Buffer constructor returns instances of `Uint8Array` that are augmented
 * with function properties for all the node `Buffer` API functions. We use
 * `Uint8Array` so that square bracket notation works as expected -- it returns
 * a single octet.
 *
 * By augmenting the instances, we can avoid modifying the `Uint8Array`
 * prototype.
 */
Buffer

The Buffer constructor returns instances of `Uint8Array` that are augmented
with function properties for all the node `Buffer` API functions. We use
`Uint8Array` so that square bracket notation works as expected -- it returns
a single octet.

By augmenting the instances, we can avoid modifying the `Uint8Array`
prototype.
Buffer The Buffer constructor returns instances of ` Uint8Array ` that are augmented with function properties for all the node ` Buffer ` API functions . We use ` Uint8Array ` so that square bracket notation works as expected -- it returns a single octet . By augmenting the instances we can avoid modifying the ` Uint8Array ` prototype .
function Buffer (subject, encoding, noZero) {
  if (!(this instanceof Buffer))
    return new Buffer(subject, encoding, noZero)
  var type = typeof subject
  if (encoding === 'base64' && type === 'string') {
    subject = stringtrim(subject)
    while (subject.length % 4 !== 0) {
      subject = subject + '='
    }
  }
  var length
  if (type === 'number')
    length = coerce(subject)
  else if (type === 'string')
    length = Buffer.byteLength(subject, encoding)
  else if (type === 'object')
    length = coerce(subject.length) 
  else
    throw new Error('First argument needs to be a number, array or string.')
  var buf
  if (Buffer._useTypedArrays) {
    buf = augment(new Uint8Array(length))
  } else {
    buf = this
    buf.length = length
    buf._isBuffer = true
  }
  var i
  if (Buffer._useTypedArrays && typeof Uint8Array === 'function' &&
      subject instanceof Uint8Array) {
    buf._set(subject)
  } else if (isArrayish(subject)) {
    for (i = 0; i < length; i++) {
      if (Buffer.isBuffer(subject))
        buf[i] = subject.readUInt8(i)
      else
        buf[i] = subject[i]
    }
  } else if (type === 'string') {
    buf.write(subject, 0, encoding)
  } else if (type === 'number' && !Buffer._useTypedArrays && !noZero) {
    for (i = 0; i < length; i++) {
      buf[i] = 0
    }
  }
  return buf
}
function Buffer ( subject , encoding , noZero ) { if ( ! ( this instanceof Buffer ) ) return new Buffer ( subject , encoding , noZero ) var type = typeof subject if ( encoding === 'base64' && type === 'string' ) { subject = stringtrim ( subject ) while ( subject . length % 4 !== 0 ) { subject = subject + '=' } } var length if ( type === 'number' ) length = coerce ( subject ) else if ( type === 'string' ) length = Buffer . byteLength ( subject , encoding ) else if ( type === 'object' ) length = coerce ( subject . length ) else throw new Error ( 'First argument needs to be a number, array or string.' ) var buf if ( Buffer . _useTypedArrays ) { buf = augment ( new Uint8Array ( length ) ) } else { buf = this buf . length = length buf . _isBuffer = true } var i if ( Buffer . _useTypedArrays && typeof Uint8Array === 'function' && subject instanceof Uint8Array ) { buf . _set ( subject ) } else if ( isArrayish ( subject ) ) { for ( i = 0 ; i < length ; i ++ ) { if ( Buffer . isBuffer ( subject ) ) buf [ i ] = subject . readUInt8 ( i ) else buf [ i ] = subject [ i ] } } else if ( type === 'string' ) { buf . write ( subject , 0 , encoding ) } else if ( type === 'number' && ! Buffer . _useTypedArrays && ! noZero ) { for ( i = 0 ; i < length ; i ++ ) { buf [ i ] = 0 } } return buf }
Class: Buffer
Class : Buffer
// Workaround: node's base64 implementation allows for non-padded strings // while base64-js does not. // Find the length // Assume object is an array // Preferred: Return an augmented `Uint8Array` instance for best performance // Fallback: Return THIS instance of Buffer (created by `new`) // Speed optimization -- use set if we're copying from a Uint8Array // Treat array-ish objects as a byte array