react 0.13.0-rc2 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # react
2
2
 
3
- An npm package to get you immediate access to [React](http://facebook.github.io/react/),
3
+ An npm package to get you immediate access to [React](https://facebook.github.io/react/),
4
4
  without also requiring the JSX transformer. This is especially useful for cases where you
5
5
  want to [`browserify`](https://github.com/substack/node-browserify) your module using
6
6
  `React`.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * JSXTransformer v0.13.0-rc2
2
+ * JSXTransformer v0.13.3
3
3
  */
4
4
  (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
5
5
  /**
@@ -401,8 +401,8 @@ function processOptions(opts) {
401
401
  if (opts.es6module) {
402
402
  options.sourceType = 'module';
403
403
  }
404
- if (opts.nonStrictEs6Module) {
405
- options.sourceType = 'nonStrict6Module';
404
+ if (opts.nonStrictEs6module) {
405
+ options.sourceType = 'nonStrictModule';
406
406
  }
407
407
 
408
408
  // Instead of doing any fancy validation, only look for 'es3'. If we have
@@ -502,41 +502,36 @@ Buffer.TYPED_ARRAY_SUPPORT = (function () {
502
502
  * By augmenting the instances, we can avoid modifying the `Uint8Array`
503
503
  * prototype.
504
504
  */
505
- function Buffer (subject, encoding, noZero) {
506
- if (!(this instanceof Buffer))
507
- return new Buffer(subject, encoding, noZero)
505
+ function Buffer (subject, encoding) {
506
+ var self = this
507
+ if (!(self instanceof Buffer)) return new Buffer(subject, encoding)
508
508
 
509
509
  var type = typeof subject
510
-
511
- // Find the length
512
510
  var length
511
+
513
512
  if (type === 'number') {
514
513
  length = +subject
515
514
  } else if (type === 'string') {
516
515
  length = Buffer.byteLength(subject, encoding)
517
- } else if (type === 'object' && subject !== null) { // assume object is array-like
518
- if (subject.type === 'Buffer' && isArray(subject.data))
519
- subject = subject.data
516
+ } else if (type === 'object' && subject !== null) {
517
+ // assume object is array-like
518
+ if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data
520
519
  length = +subject.length
521
520
  } else {
522
521
  throw new TypeError('must start with number, buffer, array or string')
523
522
  }
524
523
 
525
- if (length > kMaxLength)
526
- throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
527
- 'size: 0x' + kMaxLength.toString(16) + ' bytes')
524
+ if (length > kMaxLength) {
525
+ throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' +
526
+ kMaxLength.toString(16) + ' bytes')
527
+ }
528
528
 
529
- if (length < 0)
530
- length = 0
531
- else
532
- length >>>= 0 // Coerce to uint32.
529
+ if (length < 0) length = 0
530
+ else length >>>= 0 // coerce to uint32
533
531
 
534
- var self = this
535
532
  if (Buffer.TYPED_ARRAY_SUPPORT) {
536
533
  // Preferred: Return an augmented `Uint8Array` instance for best performance
537
- /*eslint-disable consistent-this */
538
- self = Buffer._augment(new Uint8Array(length))
539
- /*eslint-enable consistent-this */
534
+ self = Buffer._augment(new Uint8Array(length)) // eslint-disable-line consistent-this
540
535
  } else {
541
536
  // Fallback: Return THIS instance of Buffer (created by `new`)
542
537
  self.length = length
@@ -550,42 +545,43 @@ function Buffer (subject, encoding, noZero) {
550
545
  } else if (isArrayish(subject)) {
551
546
  // Treat array-ish objects as a byte array
552
547
  if (Buffer.isBuffer(subject)) {
553
- for (i = 0; i < length; i++)
548
+ for (i = 0; i < length; i++) {
554
549
  self[i] = subject.readUInt8(i)
550
+ }
555
551
  } else {
556
- for (i = 0; i < length; i++)
552
+ for (i = 0; i < length; i++) {
557
553
  self[i] = ((subject[i] % 256) + 256) % 256
554
+ }
558
555
  }
559
556
  } else if (type === 'string') {
560
557
  self.write(subject, 0, encoding)
561
- } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {
558
+ } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT) {
562
559
  for (i = 0; i < length; i++) {
563
560
  self[i] = 0
564
561
  }
565
562
  }
566
563
 
567
- if (length > 0 && length <= Buffer.poolSize)
568
- self.parent = rootParent
564
+ if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent
569
565
 
570
566
  return self
571
567
  }
572
568
 
573
- function SlowBuffer (subject, encoding, noZero) {
574
- if (!(this instanceof SlowBuffer))
575
- return new SlowBuffer(subject, encoding, noZero)
569
+ function SlowBuffer (subject, encoding) {
570
+ if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)
576
571
 
577
- var buf = new Buffer(subject, encoding, noZero)
572
+ var buf = new Buffer(subject, encoding)
578
573
  delete buf.parent
579
574
  return buf
580
575
  }
581
576
 
582
- Buffer.isBuffer = function (b) {
577
+ Buffer.isBuffer = function isBuffer (b) {
583
578
  return !!(b != null && b._isBuffer)
584
579
  }
585
580
 
586
- Buffer.compare = function (a, b) {
587
- if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b))
581
+ Buffer.compare = function compare (a, b) {
582
+ if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
588
583
  throw new TypeError('Arguments must be Buffers')
584
+ }
589
585
 
590
586
  if (a === b) return 0
591
587
 
@@ -601,7 +597,7 @@ Buffer.compare = function (a, b) {
601
597
  return 0
602
598
  }
603
599
 
604
- Buffer.isEncoding = function (encoding) {
600
+ Buffer.isEncoding = function isEncoding (encoding) {
605
601
  switch (String(encoding).toLowerCase()) {
606
602
  case 'hex':
607
603
  case 'utf8':
@@ -620,8 +616,8 @@ Buffer.isEncoding = function (encoding) {
620
616
  }
621
617
  }
622
618
 
623
- Buffer.concat = function (list, totalLength) {
624
- if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])')
619
+ Buffer.concat = function concat (list, totalLength) {
620
+ if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')
625
621
 
626
622
  if (list.length === 0) {
627
623
  return new Buffer(0)
@@ -647,7 +643,7 @@ Buffer.concat = function (list, totalLength) {
647
643
  return buf
648
644
  }
649
645
 
650
- Buffer.byteLength = function (str, encoding) {
646
+ Buffer.byteLength = function byteLength (str, encoding) {
651
647
  var ret
652
648
  str = str + ''
653
649
  switch (encoding || 'utf8') {
@@ -683,7 +679,7 @@ Buffer.prototype.length = undefined
683
679
  Buffer.prototype.parent = undefined
684
680
 
685
681
  // toString(encoding, start=0, end=buffer.length)
686
- Buffer.prototype.toString = function (encoding, start, end) {
682
+ Buffer.prototype.toString = function toString (encoding, start, end) {
687
683
  var loweredCase = false
688
684
 
689
685
  start = start >>> 0
@@ -719,45 +715,84 @@ Buffer.prototype.toString = function (encoding, start, end) {
719
715
  return utf16leSlice(this, start, end)
720
716
 
721
717
  default:
722
- if (loweredCase)
723
- throw new TypeError('Unknown encoding: ' + encoding)
718
+ if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
724
719
  encoding = (encoding + '').toLowerCase()
725
720
  loweredCase = true
726
721
  }
727
722
  }
728
723
  }
729
724
 
730
- Buffer.prototype.equals = function (b) {
725
+ Buffer.prototype.equals = function equals (b) {
731
726
  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
732
727
  if (this === b) return true
733
728
  return Buffer.compare(this, b) === 0
734
729
  }
735
730
 
736
- Buffer.prototype.inspect = function () {
731
+ Buffer.prototype.inspect = function inspect () {
737
732
  var str = ''
738
733
  var max = exports.INSPECT_MAX_BYTES
739
734
  if (this.length > 0) {
740
735
  str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
741
- if (this.length > max)
742
- str += ' ... '
736
+ if (this.length > max) str += ' ... '
743
737
  }
744
738
  return '<Buffer ' + str + '>'
745
739
  }
746
740
 
747
- Buffer.prototype.compare = function (b) {
741
+ Buffer.prototype.compare = function compare (b) {
748
742
  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
749
743
  if (this === b) return 0
750
744
  return Buffer.compare(this, b)
751
745
  }
752
746
 
747
+ Buffer.prototype.indexOf = function indexOf (val, byteOffset) {
748
+ if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff
749
+ else if (byteOffset < -0x80000000) byteOffset = -0x80000000
750
+ byteOffset >>= 0
751
+
752
+ if (this.length === 0) return -1
753
+ if (byteOffset >= this.length) return -1
754
+
755
+ // Negative offsets start from the end of the buffer
756
+ if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)
757
+
758
+ if (typeof val === 'string') {
759
+ if (val.length === 0) return -1 // special case: looking for empty string always fails
760
+ return String.prototype.indexOf.call(this, val, byteOffset)
761
+ }
762
+ if (Buffer.isBuffer(val)) {
763
+ return arrayIndexOf(this, val, byteOffset)
764
+ }
765
+ if (typeof val === 'number') {
766
+ if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {
767
+ return Uint8Array.prototype.indexOf.call(this, val, byteOffset)
768
+ }
769
+ return arrayIndexOf(this, [ val ], byteOffset)
770
+ }
771
+
772
+ function arrayIndexOf (arr, val, byteOffset) {
773
+ var foundIndex = -1
774
+ for (var i = 0; byteOffset + i < arr.length; i++) {
775
+ if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {
776
+ if (foundIndex === -1) foundIndex = i
777
+ if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex
778
+ } else {
779
+ foundIndex = -1
780
+ }
781
+ }
782
+ return -1
783
+ }
784
+
785
+ throw new TypeError('val must be string, number or Buffer')
786
+ }
787
+
753
788
  // `get` will be removed in Node 0.13+
754
- Buffer.prototype.get = function (offset) {
789
+ Buffer.prototype.get = function get (offset) {
755
790
  console.log('.get() is deprecated. Access using array indexes instead.')
756
791
  return this.readUInt8(offset)
757
792
  }
758
793
 
759
794
  // `set` will be removed in Node 0.13+
760
- Buffer.prototype.set = function (v, offset) {
795
+ Buffer.prototype.set = function set (v, offset) {
761
796
  console.log('.set() is deprecated. Access using array indexes instead.')
762
797
  return this.writeUInt8(v, offset)
763
798
  }
@@ -782,9 +817,9 @@ function hexWrite (buf, string, offset, length) {
782
817
  length = strLen / 2
783
818
  }
784
819
  for (var i = 0; i < length; i++) {
785
- var byte = parseInt(string.substr(i * 2, 2), 16)
786
- if (isNaN(byte)) throw new Error('Invalid hex string')
787
- buf[offset + i] = byte
820
+ var parsed = parseInt(string.substr(i * 2, 2), 16)
821
+ if (isNaN(parsed)) throw new Error('Invalid hex string')
822
+ buf[offset + i] = parsed
788
823
  }
789
824
  return i
790
825
  }
@@ -813,7 +848,7 @@ function utf16leWrite (buf, string, offset, length) {
813
848
  return charsWritten
814
849
  }
815
850
 
816
- Buffer.prototype.write = function (string, offset, length, encoding) {
851
+ Buffer.prototype.write = function write (string, offset, length, encoding) {
817
852
  // Support both (string, offset, length, encoding)
818
853
  // and the legacy (string, encoding, offset, length)
819
854
  if (isFinite(offset)) {
@@ -830,8 +865,9 @@ Buffer.prototype.write = function (string, offset, length, encoding) {
830
865
 
831
866
  offset = Number(offset) || 0
832
867
 
833
- if (length < 0 || offset < 0 || offset > this.length)
868
+ if (length < 0 || offset < 0 || offset > this.length) {
834
869
  throw new RangeError('attempt to write outside buffer bounds')
870
+ }
835
871
 
836
872
  var remaining = this.length - offset
837
873
  if (!length) {
@@ -874,7 +910,7 @@ Buffer.prototype.write = function (string, offset, length, encoding) {
874
910
  return ret
875
911
  }
876
912
 
877
- Buffer.prototype.toJSON = function () {
913
+ Buffer.prototype.toJSON = function toJSON () {
878
914
  return {
879
915
  type: 'Buffer',
880
916
  data: Array.prototype.slice.call(this._arr || this, 0)
@@ -948,43 +984,39 @@ function utf16leSlice (buf, start, end) {
948
984
  return res
949
985
  }
950
986
 
951
- Buffer.prototype.slice = function (start, end) {
987
+ Buffer.prototype.slice = function slice (start, end) {
952
988
  var len = this.length
953
989
  start = ~~start
954
990
  end = end === undefined ? len : ~~end
955
991
 
956
992
  if (start < 0) {
957
993
  start += len
958
- if (start < 0)
959
- start = 0
994
+ if (start < 0) start = 0
960
995
  } else if (start > len) {
961
996
  start = len
962
997
  }
963
998
 
964
999
  if (end < 0) {
965
1000
  end += len
966
- if (end < 0)
967
- end = 0
1001
+ if (end < 0) end = 0
968
1002
  } else if (end > len) {
969
1003
  end = len
970
1004
  }
971
1005
 
972
- if (end < start)
973
- end = start
1006
+ if (end < start) end = start
974
1007
 
975
1008
  var newBuf
976
1009
  if (Buffer.TYPED_ARRAY_SUPPORT) {
977
1010
  newBuf = Buffer._augment(this.subarray(start, end))
978
1011
  } else {
979
1012
  var sliceLen = end - start
980
- newBuf = new Buffer(sliceLen, undefined, true)
1013
+ newBuf = new Buffer(sliceLen, undefined)
981
1014
  for (var i = 0; i < sliceLen; i++) {
982
1015
  newBuf[i] = this[i + start]
983
1016
  }
984
1017
  }
985
1018
 
986
- if (newBuf.length)
987
- newBuf.parent = this.parent || this
1019
+ if (newBuf.length) newBuf.parent = this.parent || this
988
1020
 
989
1021
  return newBuf
990
1022
  }
@@ -993,62 +1025,58 @@ Buffer.prototype.slice = function (start, end) {
993
1025
  * Need to make sure that buffer isn't trying to write out of bounds.
994
1026
  */
995
1027
  function checkOffset (offset, ext, length) {
996
- if ((offset % 1) !== 0 || offset < 0)
997
- throw new RangeError('offset is not uint')
998
- if (offset + ext > length)
999
- throw new RangeError('Trying to access beyond buffer length')
1028
+ if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
1029
+ if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
1000
1030
  }
1001
1031
 
1002
- Buffer.prototype.readUIntLE = function (offset, byteLength, noAssert) {
1032
+ Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
1003
1033
  offset = offset >>> 0
1004
1034
  byteLength = byteLength >>> 0
1005
- if (!noAssert)
1006
- checkOffset(offset, byteLength, this.length)
1035
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
1007
1036
 
1008
1037
  var val = this[offset]
1009
1038
  var mul = 1
1010
1039
  var i = 0
1011
- while (++i < byteLength && (mul *= 0x100))
1040
+ while (++i < byteLength && (mul *= 0x100)) {
1012
1041
  val += this[offset + i] * mul
1042
+ }
1013
1043
 
1014
1044
  return val
1015
1045
  }
1016
1046
 
1017
- Buffer.prototype.readUIntBE = function (offset, byteLength, noAssert) {
1047
+ Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
1018
1048
  offset = offset >>> 0
1019
1049
  byteLength = byteLength >>> 0
1020
- if (!noAssert)
1050
+ if (!noAssert) {
1021
1051
  checkOffset(offset, byteLength, this.length)
1052
+ }
1022
1053
 
1023
1054
  var val = this[offset + --byteLength]
1024
1055
  var mul = 1
1025
- while (byteLength > 0 && (mul *= 0x100))
1056
+ while (byteLength > 0 && (mul *= 0x100)) {
1026
1057
  val += this[offset + --byteLength] * mul
1058
+ }
1027
1059
 
1028
1060
  return val
1029
1061
  }
1030
1062
 
1031
- Buffer.prototype.readUInt8 = function (offset, noAssert) {
1032
- if (!noAssert)
1033
- checkOffset(offset, 1, this.length)
1063
+ Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
1064
+ if (!noAssert) checkOffset(offset, 1, this.length)
1034
1065
  return this[offset]
1035
1066
  }
1036
1067
 
1037
- Buffer.prototype.readUInt16LE = function (offset, noAssert) {
1038
- if (!noAssert)
1039
- checkOffset(offset, 2, this.length)
1068
+ Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
1069
+ if (!noAssert) checkOffset(offset, 2, this.length)
1040
1070
  return this[offset] | (this[offset + 1] << 8)
1041
1071
  }
1042
1072
 
1043
- Buffer.prototype.readUInt16BE = function (offset, noAssert) {
1044
- if (!noAssert)
1045
- checkOffset(offset, 2, this.length)
1073
+ Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
1074
+ if (!noAssert) checkOffset(offset, 2, this.length)
1046
1075
  return (this[offset] << 8) | this[offset + 1]
1047
1076
  }
1048
1077
 
1049
- Buffer.prototype.readUInt32LE = function (offset, noAssert) {
1050
- if (!noAssert)
1051
- checkOffset(offset, 4, this.length)
1078
+ Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
1079
+ if (!noAssert) checkOffset(offset, 4, this.length)
1052
1080
 
1053
1081
  return ((this[offset]) |
1054
1082
  (this[offset + 1] << 8) |
@@ -1056,117 +1084,104 @@ Buffer.prototype.readUInt32LE = function (offset, noAssert) {
1056
1084
  (this[offset + 3] * 0x1000000)
1057
1085
  }
1058
1086
 
1059
- Buffer.prototype.readUInt32BE = function (offset, noAssert) {
1060
- if (!noAssert)
1061
- checkOffset(offset, 4, this.length)
1087
+ Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
1088
+ if (!noAssert) checkOffset(offset, 4, this.length)
1062
1089
 
1063
1090
  return (this[offset] * 0x1000000) +
1064
- ((this[offset + 1] << 16) |
1065
- (this[offset + 2] << 8) |
1066
- this[offset + 3])
1091
+ ((this[offset + 1] << 16) |
1092
+ (this[offset + 2] << 8) |
1093
+ this[offset + 3])
1067
1094
  }
1068
1095
 
1069
- Buffer.prototype.readIntLE = function (offset, byteLength, noAssert) {
1096
+ Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
1070
1097
  offset = offset >>> 0
1071
1098
  byteLength = byteLength >>> 0
1072
- if (!noAssert)
1073
- checkOffset(offset, byteLength, this.length)
1099
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
1074
1100
 
1075
1101
  var val = this[offset]
1076
1102
  var mul = 1
1077
1103
  var i = 0
1078
- while (++i < byteLength && (mul *= 0x100))
1104
+ while (++i < byteLength && (mul *= 0x100)) {
1079
1105
  val += this[offset + i] * mul
1106
+ }
1080
1107
  mul *= 0x80
1081
1108
 
1082
- if (val >= mul)
1083
- val -= Math.pow(2, 8 * byteLength)
1109
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
1084
1110
 
1085
1111
  return val
1086
1112
  }
1087
1113
 
1088
- Buffer.prototype.readIntBE = function (offset, byteLength, noAssert) {
1114
+ Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
1089
1115
  offset = offset >>> 0
1090
1116
  byteLength = byteLength >>> 0
1091
- if (!noAssert)
1092
- checkOffset(offset, byteLength, this.length)
1117
+ if (!noAssert) checkOffset(offset, byteLength, this.length)
1093
1118
 
1094
1119
  var i = byteLength
1095
1120
  var mul = 1
1096
1121
  var val = this[offset + --i]
1097
- while (i > 0 && (mul *= 0x100))
1122
+ while (i > 0 && (mul *= 0x100)) {
1098
1123
  val += this[offset + --i] * mul
1124
+ }
1099
1125
  mul *= 0x80
1100
1126
 
1101
- if (val >= mul)
1102
- val -= Math.pow(2, 8 * byteLength)
1127
+ if (val >= mul) val -= Math.pow(2, 8 * byteLength)
1103
1128
 
1104
1129
  return val
1105
1130
  }
1106
1131
 
1107
- Buffer.prototype.readInt8 = function (offset, noAssert) {
1108
- if (!noAssert)
1109
- checkOffset(offset, 1, this.length)
1110
- if (!(this[offset] & 0x80))
1111
- return (this[offset])
1132
+ Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
1133
+ if (!noAssert) checkOffset(offset, 1, this.length)
1134
+ if (!(this[offset] & 0x80)) return (this[offset])
1112
1135
  return ((0xff - this[offset] + 1) * -1)
1113
1136
  }
1114
1137
 
1115
- Buffer.prototype.readInt16LE = function (offset, noAssert) {
1116
- if (!noAssert)
1117
- checkOffset(offset, 2, this.length)
1138
+ Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
1139
+ if (!noAssert) checkOffset(offset, 2, this.length)
1118
1140
  var val = this[offset] | (this[offset + 1] << 8)
1119
1141
  return (val & 0x8000) ? val | 0xFFFF0000 : val
1120
1142
  }
1121
1143
 
1122
- Buffer.prototype.readInt16BE = function (offset, noAssert) {
1123
- if (!noAssert)
1124
- checkOffset(offset, 2, this.length)
1144
+ Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
1145
+ if (!noAssert) checkOffset(offset, 2, this.length)
1125
1146
  var val = this[offset + 1] | (this[offset] << 8)
1126
1147
  return (val & 0x8000) ? val | 0xFFFF0000 : val
1127
1148
  }
1128
1149
 
1129
- Buffer.prototype.readInt32LE = function (offset, noAssert) {
1130
- if (!noAssert)
1131
- checkOffset(offset, 4, this.length)
1150
+ Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
1151
+ if (!noAssert) checkOffset(offset, 4, this.length)
1132
1152
 
1133
1153
  return (this[offset]) |
1134
- (this[offset + 1] << 8) |
1135
- (this[offset + 2] << 16) |
1136
- (this[offset + 3] << 24)
1154
+ (this[offset + 1] << 8) |
1155
+ (this[offset + 2] << 16) |
1156
+ (this[offset + 3] << 24)
1137
1157
  }
1138
1158
 
1139
- Buffer.prototype.readInt32BE = function (offset, noAssert) {
1140
- if (!noAssert)
1141
- checkOffset(offset, 4, this.length)
1159
+ Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
1160
+ if (!noAssert) checkOffset(offset, 4, this.length)
1142
1161
 
1143
1162
  return (this[offset] << 24) |
1144
- (this[offset + 1] << 16) |
1145
- (this[offset + 2] << 8) |
1146
- (this[offset + 3])
1163
+ (this[offset + 1] << 16) |
1164
+ (this[offset + 2] << 8) |
1165
+ (this[offset + 3])
1147
1166
  }
1148
1167
 
1149
- Buffer.prototype.readFloatLE = function (offset, noAssert) {
1150
- if (!noAssert)
1151
- checkOffset(offset, 4, this.length)
1168
+ Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
1169
+ if (!noAssert) checkOffset(offset, 4, this.length)
1152
1170
  return ieee754.read(this, offset, true, 23, 4)
1153
1171
  }
1154
1172
 
1155
- Buffer.prototype.readFloatBE = function (offset, noAssert) {
1156
- if (!noAssert)
1157
- checkOffset(offset, 4, this.length)
1173
+ Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
1174
+ if (!noAssert) checkOffset(offset, 4, this.length)
1158
1175
  return ieee754.read(this, offset, false, 23, 4)
1159
1176
  }
1160
1177
 
1161
- Buffer.prototype.readDoubleLE = function (offset, noAssert) {
1162
- if (!noAssert)
1163
- checkOffset(offset, 8, this.length)
1178
+ Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
1179
+ if (!noAssert) checkOffset(offset, 8, this.length)
1164
1180
  return ieee754.read(this, offset, true, 52, 8)
1165
1181
  }
1166
1182
 
1167
- Buffer.prototype.readDoubleBE = function (offset, noAssert) {
1168
- if (!noAssert)
1169
- checkOffset(offset, 8, this.length)
1183
+ Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
1184
+ if (!noAssert) checkOffset(offset, 8, this.length)
1170
1185
  return ieee754.read(this, offset, false, 52, 8)
1171
1186
  }
1172
1187
 
@@ -1176,43 +1191,42 @@ function checkInt (buf, value, offset, ext, max, min) {
1176
1191
  if (offset + ext > buf.length) throw new RangeError('index out of range')
1177
1192
  }
1178
1193
 
1179
- Buffer.prototype.writeUIntLE = function (value, offset, byteLength, noAssert) {
1194
+ Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
1180
1195
  value = +value
1181
1196
  offset = offset >>> 0
1182
1197
  byteLength = byteLength >>> 0
1183
- if (!noAssert)
1184
- checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
1198
+ if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
1185
1199
 
1186
1200
  var mul = 1
1187
1201
  var i = 0
1188
1202
  this[offset] = value & 0xFF
1189
- while (++i < byteLength && (mul *= 0x100))
1203
+ while (++i < byteLength && (mul *= 0x100)) {
1190
1204
  this[offset + i] = (value / mul) >>> 0 & 0xFF
1205
+ }
1191
1206
 
1192
1207
  return offset + byteLength
1193
1208
  }
1194
1209
 
1195
- Buffer.prototype.writeUIntBE = function (value, offset, byteLength, noAssert) {
1210
+ Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
1196
1211
  value = +value
1197
1212
  offset = offset >>> 0
1198
1213
  byteLength = byteLength >>> 0
1199
- if (!noAssert)
1200
- checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
1214
+ if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)
1201
1215
 
1202
1216
  var i = byteLength - 1
1203
1217
  var mul = 1
1204
1218
  this[offset + i] = value & 0xFF
1205
- while (--i >= 0 && (mul *= 0x100))
1219
+ while (--i >= 0 && (mul *= 0x100)) {
1206
1220
  this[offset + i] = (value / mul) >>> 0 & 0xFF
1221
+ }
1207
1222
 
1208
1223
  return offset + byteLength
1209
1224
  }
1210
1225
 
1211
- Buffer.prototype.writeUInt8 = function (value, offset, noAssert) {
1226
+ Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
1212
1227
  value = +value
1213
1228
  offset = offset >>> 0
1214
- if (!noAssert)
1215
- checkInt(this, value, offset, 1, 0xff, 0)
1229
+ if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
1216
1230
  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
1217
1231
  this[offset] = value
1218
1232
  return offset + 1
@@ -1226,27 +1240,29 @@ function objectWriteUInt16 (buf, value, offset, littleEndian) {
1226
1240
  }
1227
1241
  }
1228
1242
 
1229
- Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
1243
+ Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
1230
1244
  value = +value
1231
1245
  offset = offset >>> 0
1232
- if (!noAssert)
1233
- checkInt(this, value, offset, 2, 0xffff, 0)
1246
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
1234
1247
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1235
1248
  this[offset] = value
1236
1249
  this[offset + 1] = (value >>> 8)
1237
- } else objectWriteUInt16(this, value, offset, true)
1250
+ } else {
1251
+ objectWriteUInt16(this, value, offset, true)
1252
+ }
1238
1253
  return offset + 2
1239
1254
  }
1240
1255
 
1241
- Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
1256
+ Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
1242
1257
  value = +value
1243
1258
  offset = offset >>> 0
1244
- if (!noAssert)
1245
- checkInt(this, value, offset, 2, 0xffff, 0)
1259
+ if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
1246
1260
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1247
1261
  this[offset] = (value >>> 8)
1248
1262
  this[offset + 1] = value
1249
- } else objectWriteUInt16(this, value, offset, false)
1263
+ } else {
1264
+ objectWriteUInt16(this, value, offset, false)
1265
+ }
1250
1266
  return offset + 2
1251
1267
  }
1252
1268
 
@@ -1257,139 +1273,144 @@ function objectWriteUInt32 (buf, value, offset, littleEndian) {
1257
1273
  }
1258
1274
  }
1259
1275
 
1260
- Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
1276
+ Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
1261
1277
  value = +value
1262
1278
  offset = offset >>> 0
1263
- if (!noAssert)
1264
- checkInt(this, value, offset, 4, 0xffffffff, 0)
1279
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
1265
1280
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1266
1281
  this[offset + 3] = (value >>> 24)
1267
1282
  this[offset + 2] = (value >>> 16)
1268
1283
  this[offset + 1] = (value >>> 8)
1269
1284
  this[offset] = value
1270
- } else objectWriteUInt32(this, value, offset, true)
1285
+ } else {
1286
+ objectWriteUInt32(this, value, offset, true)
1287
+ }
1271
1288
  return offset + 4
1272
1289
  }
1273
1290
 
1274
- Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
1291
+ Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
1275
1292
  value = +value
1276
1293
  offset = offset >>> 0
1277
- if (!noAssert)
1278
- checkInt(this, value, offset, 4, 0xffffffff, 0)
1294
+ if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
1279
1295
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1280
1296
  this[offset] = (value >>> 24)
1281
1297
  this[offset + 1] = (value >>> 16)
1282
1298
  this[offset + 2] = (value >>> 8)
1283
1299
  this[offset + 3] = value
1284
- } else objectWriteUInt32(this, value, offset, false)
1300
+ } else {
1301
+ objectWriteUInt32(this, value, offset, false)
1302
+ }
1285
1303
  return offset + 4
1286
1304
  }
1287
1305
 
1288
- Buffer.prototype.writeIntLE = function (value, offset, byteLength, noAssert) {
1306
+ Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
1289
1307
  value = +value
1290
1308
  offset = offset >>> 0
1291
1309
  if (!noAssert) {
1292
- checkInt(this,
1293
- value,
1294
- offset,
1295
- byteLength,
1296
- Math.pow(2, 8 * byteLength - 1) - 1,
1297
- -Math.pow(2, 8 * byteLength - 1))
1310
+ checkInt(
1311
+ this, value, offset, byteLength,
1312
+ Math.pow(2, 8 * byteLength - 1) - 1,
1313
+ -Math.pow(2, 8 * byteLength - 1)
1314
+ )
1298
1315
  }
1299
1316
 
1300
1317
  var i = 0
1301
1318
  var mul = 1
1302
1319
  var sub = value < 0 ? 1 : 0
1303
1320
  this[offset] = value & 0xFF
1304
- while (++i < byteLength && (mul *= 0x100))
1321
+ while (++i < byteLength && (mul *= 0x100)) {
1305
1322
  this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
1323
+ }
1306
1324
 
1307
1325
  return offset + byteLength
1308
1326
  }
1309
1327
 
1310
- Buffer.prototype.writeIntBE = function (value, offset, byteLength, noAssert) {
1328
+ Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
1311
1329
  value = +value
1312
1330
  offset = offset >>> 0
1313
1331
  if (!noAssert) {
1314
- checkInt(this,
1315
- value,
1316
- offset,
1317
- byteLength,
1318
- Math.pow(2, 8 * byteLength - 1) - 1,
1319
- -Math.pow(2, 8 * byteLength - 1))
1332
+ checkInt(
1333
+ this, value, offset, byteLength,
1334
+ Math.pow(2, 8 * byteLength - 1) - 1,
1335
+ -Math.pow(2, 8 * byteLength - 1)
1336
+ )
1320
1337
  }
1321
1338
 
1322
1339
  var i = byteLength - 1
1323
1340
  var mul = 1
1324
1341
  var sub = value < 0 ? 1 : 0
1325
1342
  this[offset + i] = value & 0xFF
1326
- while (--i >= 0 && (mul *= 0x100))
1343
+ while (--i >= 0 && (mul *= 0x100)) {
1327
1344
  this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
1345
+ }
1328
1346
 
1329
1347
  return offset + byteLength
1330
1348
  }
1331
1349
 
1332
- Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
1350
+ Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
1333
1351
  value = +value
1334
1352
  offset = offset >>> 0
1335
- if (!noAssert)
1336
- checkInt(this, value, offset, 1, 0x7f, -0x80)
1353
+ if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
1337
1354
  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
1338
1355
  if (value < 0) value = 0xff + value + 1
1339
1356
  this[offset] = value
1340
1357
  return offset + 1
1341
1358
  }
1342
1359
 
1343
- Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
1360
+ Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
1344
1361
  value = +value
1345
1362
  offset = offset >>> 0
1346
- if (!noAssert)
1347
- checkInt(this, value, offset, 2, 0x7fff, -0x8000)
1363
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
1348
1364
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1349
1365
  this[offset] = value
1350
1366
  this[offset + 1] = (value >>> 8)
1351
- } else objectWriteUInt16(this, value, offset, true)
1367
+ } else {
1368
+ objectWriteUInt16(this, value, offset, true)
1369
+ }
1352
1370
  return offset + 2
1353
1371
  }
1354
1372
 
1355
- Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
1373
+ Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
1356
1374
  value = +value
1357
1375
  offset = offset >>> 0
1358
- if (!noAssert)
1359
- checkInt(this, value, offset, 2, 0x7fff, -0x8000)
1376
+ if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
1360
1377
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1361
1378
  this[offset] = (value >>> 8)
1362
1379
  this[offset + 1] = value
1363
- } else objectWriteUInt16(this, value, offset, false)
1380
+ } else {
1381
+ objectWriteUInt16(this, value, offset, false)
1382
+ }
1364
1383
  return offset + 2
1365
1384
  }
1366
1385
 
1367
- Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
1386
+ Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
1368
1387
  value = +value
1369
1388
  offset = offset >>> 0
1370
- if (!noAssert)
1371
- checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
1389
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
1372
1390
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1373
1391
  this[offset] = value
1374
1392
  this[offset + 1] = (value >>> 8)
1375
1393
  this[offset + 2] = (value >>> 16)
1376
1394
  this[offset + 3] = (value >>> 24)
1377
- } else objectWriteUInt32(this, value, offset, true)
1395
+ } else {
1396
+ objectWriteUInt32(this, value, offset, true)
1397
+ }
1378
1398
  return offset + 4
1379
1399
  }
1380
1400
 
1381
- Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
1401
+ Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
1382
1402
  value = +value
1383
1403
  offset = offset >>> 0
1384
- if (!noAssert)
1385
- checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
1404
+ if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
1386
1405
  if (value < 0) value = 0xffffffff + value + 1
1387
1406
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1388
1407
  this[offset] = (value >>> 24)
1389
1408
  this[offset + 1] = (value >>> 16)
1390
1409
  this[offset + 2] = (value >>> 8)
1391
1410
  this[offset + 3] = value
1392
- } else objectWriteUInt32(this, value, offset, false)
1411
+ } else {
1412
+ objectWriteUInt32(this, value, offset, false)
1413
+ }
1393
1414
  return offset + 4
1394
1415
  }
1395
1416
 
@@ -1400,39 +1421,39 @@ function checkIEEE754 (buf, value, offset, ext, max, min) {
1400
1421
  }
1401
1422
 
1402
1423
  function writeFloat (buf, value, offset, littleEndian, noAssert) {
1403
- if (!noAssert)
1424
+ if (!noAssert) {
1404
1425
  checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
1426
+ }
1405
1427
  ieee754.write(buf, value, offset, littleEndian, 23, 4)
1406
1428
  return offset + 4
1407
1429
  }
1408
1430
 
1409
- Buffer.prototype.writeFloatLE = function (value, offset, noAssert) {
1431
+ Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
1410
1432
  return writeFloat(this, value, offset, true, noAssert)
1411
1433
  }
1412
1434
 
1413
- Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
1435
+ Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
1414
1436
  return writeFloat(this, value, offset, false, noAssert)
1415
1437
  }
1416
1438
 
1417
1439
  function writeDouble (buf, value, offset, littleEndian, noAssert) {
1418
- if (!noAssert)
1440
+ if (!noAssert) {
1419
1441
  checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
1442
+ }
1420
1443
  ieee754.write(buf, value, offset, littleEndian, 52, 8)
1421
1444
  return offset + 8
1422
1445
  }
1423
1446
 
1424
- Buffer.prototype.writeDoubleLE = function (value, offset, noAssert) {
1447
+ Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
1425
1448
  return writeDouble(this, value, offset, true, noAssert)
1426
1449
  }
1427
1450
 
1428
- Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
1451
+ Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
1429
1452
  return writeDouble(this, value, offset, false, noAssert)
1430
1453
  }
1431
1454
 
1432
1455
  // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
1433
- Buffer.prototype.copy = function (target, target_start, start, end) {
1434
- var self = this // source
1435
-
1456
+ Buffer.prototype.copy = function copy (target, target_start, start, end) {
1436
1457
  if (!start) start = 0
1437
1458
  if (!end && end !== 0) end = this.length
1438
1459
  if (target_start >= target.length) target_start = target.length
@@ -1441,19 +1462,20 @@ Buffer.prototype.copy = function (target, target_start, start, end) {
1441
1462
 
1442
1463
  // Copy 0 bytes; we're done
1443
1464
  if (end === start) return 0
1444
- if (target.length === 0 || self.length === 0) return 0
1465
+ if (target.length === 0 || this.length === 0) return 0
1445
1466
 
1446
1467
  // Fatal error conditions
1447
- if (target_start < 0)
1468
+ if (target_start < 0) {
1448
1469
  throw new RangeError('targetStart out of bounds')
1449
- if (start < 0 || start >= self.length) throw new RangeError('sourceStart out of bounds')
1470
+ }
1471
+ if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
1450
1472
  if (end < 0) throw new RangeError('sourceEnd out of bounds')
1451
1473
 
1452
1474
  // Are we oob?
1453
- if (end > this.length)
1454
- end = this.length
1455
- if (target.length - target_start < end - start)
1475
+ if (end > this.length) end = this.length
1476
+ if (target.length - target_start < end - start) {
1456
1477
  end = target.length - target_start + start
1478
+ }
1457
1479
 
1458
1480
  var len = end - start
1459
1481
 
@@ -1469,7 +1491,7 @@ Buffer.prototype.copy = function (target, target_start, start, end) {
1469
1491
  }
1470
1492
 
1471
1493
  // fill(value, start=0, end=buffer.length)
1472
- Buffer.prototype.fill = function (value, start, end) {
1494
+ Buffer.prototype.fill = function fill (value, start, end) {
1473
1495
  if (!value) value = 0
1474
1496
  if (!start) start = 0
1475
1497
  if (!end) end = this.length
@@ -1503,7 +1525,7 @@ Buffer.prototype.fill = function (value, start, end) {
1503
1525
  * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
1504
1526
  * Added in Node 0.12. Only available in browsers that support ArrayBuffer.
1505
1527
  */
1506
- Buffer.prototype.toArrayBuffer = function () {
1528
+ Buffer.prototype.toArrayBuffer = function toArrayBuffer () {
1507
1529
  if (typeof Uint8Array !== 'undefined') {
1508
1530
  if (Buffer.TYPED_ARRAY_SUPPORT) {
1509
1531
  return (new Buffer(this)).buffer
@@ -1527,12 +1549,11 @@ var BP = Buffer.prototype
1527
1549
  /**
1528
1550
  * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods
1529
1551
  */
1530
- Buffer._augment = function (arr) {
1552
+ Buffer._augment = function _augment (arr) {
1531
1553
  arr.constructor = Buffer
1532
1554
  arr._isBuffer = true
1533
1555
 
1534
- // save reference to original Uint8Array get/set methods before overwriting
1535
- arr._get = arr.get
1556
+ // save reference to original Uint8Array set method before overwriting
1536
1557
  arr._set = arr.set
1537
1558
 
1538
1559
  // deprecated, will be removed in node 0.13+
@@ -1545,6 +1566,7 @@ Buffer._augment = function (arr) {
1545
1566
  arr.toJSON = BP.toJSON
1546
1567
  arr.equals = BP.equals
1547
1568
  arr.compare = BP.compare
1569
+ arr.indexOf = BP.indexOf
1548
1570
  arr.copy = BP.copy
1549
1571
  arr.slice = BP.slice
1550
1572
  arr.readUIntLE = BP.readUIntLE
@@ -1732,8 +1754,7 @@ function base64ToBytes (str) {
1732
1754
 
1733
1755
  function blitBuffer (src, dst, offset, length) {
1734
1756
  for (var i = 0; i < length; i++) {
1735
- if ((i + offset >= dst.length) || (i >= src.length))
1736
- break
1757
+ if ((i + offset >= dst.length) || (i >= src.length)) break
1737
1758
  dst[i + offset] = src[i]
1738
1759
  }
1739
1760
  return i
@@ -2259,6 +2280,7 @@ process.browser = true;
2259
2280
  process.env = {};
2260
2281
  process.argv = [];
2261
2282
  process.version = ''; // empty string to avoid regexp issues
2283
+ process.versions = {};
2262
2284
 
2263
2285
  function noop() {}
2264
2286
 
@@ -3178,7 +3200,7 @@ process.umask = function() { return 0; };
3178
3200
 
3179
3201
  // 3-character punctuators: === !== >>> <<= >>=
3180
3202
 
3181
- if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
3203
+ if (ch1 === '>' && ch2 === '>' && ch3 === '>' && !state.inType) {
3182
3204
  index += 3;
3183
3205
  return {
3184
3206
  type: Token.Punctuator,
@@ -6575,7 +6597,7 @@ process.umask = function() { return 0; };
6575
6597
 
6576
6598
  expect('<');
6577
6599
  while (!match('>')) {
6578
- paramTypes.push(parseVariableIdentifier());
6600
+ paramTypes.push(parseTypeAnnotatableIdentifier());
6579
6601
  if (!match('>')) {
6580
6602
  expect(',');
6581
6603
  }
@@ -9956,7 +9978,7 @@ process.umask = function() { return 0; };
9956
9978
  }
9957
9979
 
9958
9980
  // Sync with *.json manifests.
9959
- exports.version = '13001.1.0-dev-harmony-fb';
9981
+ exports.version = '13001.1001.0-dev-harmony-fb';
9960
9982
 
9961
9983
  exports.tokenize = tokenize;
9962
9984