kickstart_rails 0.2.410965837961 → 0.2.410970240580
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dab69e77d321ec52b4a3aebe01bb04228715912
|
4
|
+
data.tar.gz: 0497e45522cef1c983eb9a73803cff0e51cc2e8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9661a927988e5a0171b9be299814291874f06e043aa26e2e1f70615f86bae28c2ac3f9faa3d815cd906f27ceed46f8bbf26ead040b6ecf28b5ea482722eb6055
|
7
|
+
data.tar.gz: 7351ed18229744e3544f4332bb6f382f0ea02dc45fe74c887f198f047542def0a0f756147f5ff4ad8fb451570deb9afc9dcea7a95ad2946e33b3d6359a507cf3
|
@@ -457,14 +457,17 @@ describe('Status', function() {
|
|
457
457
|
|
458
458
|
var base64 = require('base64-js')
|
459
459
|
var ieee754 = require('ieee754')
|
460
|
+
var isArray = require('is-array')
|
460
461
|
|
461
462
|
exports.Buffer = Buffer
|
462
463
|
exports.SlowBuffer = Buffer
|
463
464
|
exports.INSPECT_MAX_BYTES = 50
|
464
|
-
Buffer.poolSize = 8192
|
465
|
+
Buffer.poolSize = 8192 // not used by this implementation
|
466
|
+
|
467
|
+
var kMaxLength = 0x3fffffff
|
465
468
|
|
466
469
|
/**
|
467
|
-
* If `TYPED_ARRAY_SUPPORT`:
|
470
|
+
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
468
471
|
* === true Use Uint8Array implementation (fastest)
|
469
472
|
* === false Use Object implementation (most compatible, even IE6)
|
470
473
|
*
|
@@ -482,10 +485,10 @@ Buffer.poolSize = 8192
|
|
482
485
|
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
|
483
486
|
* incorrect length in some situations.
|
484
487
|
*
|
485
|
-
* We detect these buggy browsers and set `TYPED_ARRAY_SUPPORT` to `false` so they will
|
488
|
+
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will
|
486
489
|
* get the Object implementation, which is slower but will work correctly.
|
487
490
|
*/
|
488
|
-
|
491
|
+
Buffer.TYPED_ARRAY_SUPPORT = (function () {
|
489
492
|
try {
|
490
493
|
var buf = new ArrayBuffer(0)
|
491
494
|
var arr = new Uint8Array(buf)
|
@@ -529,10 +532,14 @@ function Buffer (subject, encoding, noZero) {
|
|
529
532
|
subject = subject.data
|
530
533
|
length = +subject.length > 0 ? Math.floor(+subject.length) : 0
|
531
534
|
} else
|
532
|
-
throw new
|
535
|
+
throw new TypeError('must start with number, buffer, array or string')
|
536
|
+
|
537
|
+
if (this.length > kMaxLength)
|
538
|
+
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
|
539
|
+
'size: 0x' + kMaxLength.toString(16) + ' bytes')
|
533
540
|
|
534
541
|
var buf
|
535
|
-
if (TYPED_ARRAY_SUPPORT) {
|
542
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
536
543
|
// Preferred: Return an augmented `Uint8Array` instance for best performance
|
537
544
|
buf = Buffer._augment(new Uint8Array(length))
|
538
545
|
} else {
|
@@ -543,7 +550,7 @@ function Buffer (subject, encoding, noZero) {
|
|
543
550
|
}
|
544
551
|
|
545
552
|
var i
|
546
|
-
if (TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {
|
553
|
+
if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') {
|
547
554
|
// Speed optimization -- use set if we're copying from a typed array
|
548
555
|
buf._set(subject)
|
549
556
|
} else if (isArrayish(subject)) {
|
@@ -557,7 +564,7 @@ function Buffer (subject, encoding, noZero) {
|
|
557
564
|
}
|
558
565
|
} else if (type === 'string') {
|
559
566
|
buf.write(subject, 0, encoding)
|
560
|
-
} else if (type === 'number' && !TYPED_ARRAY_SUPPORT && !noZero) {
|
567
|
+
} else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) {
|
561
568
|
for (i = 0; i < length; i++) {
|
562
569
|
buf[i] = 0
|
563
570
|
}
|
@@ -566,8 +573,25 @@ function Buffer (subject, encoding, noZero) {
|
|
566
573
|
return buf
|
567
574
|
}
|
568
575
|
|
569
|
-
|
570
|
-
|
576
|
+
Buffer.isBuffer = function (b) {
|
577
|
+
return !!(b != null && b._isBuffer)
|
578
|
+
}
|
579
|
+
|
580
|
+
Buffer.compare = function (a, b) {
|
581
|
+
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b))
|
582
|
+
throw new TypeError('Arguments must be Buffers')
|
583
|
+
|
584
|
+
var x = a.length
|
585
|
+
var y = b.length
|
586
|
+
for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {}
|
587
|
+
if (i !== len) {
|
588
|
+
x = a[i]
|
589
|
+
y = b[i]
|
590
|
+
}
|
591
|
+
if (x < y) return -1
|
592
|
+
if (y < x) return 1
|
593
|
+
return 0
|
594
|
+
}
|
571
595
|
|
572
596
|
Buffer.isEncoding = function (encoding) {
|
573
597
|
switch (String(encoding).toLowerCase()) {
|
@@ -588,43 +612,8 @@ Buffer.isEncoding = function (encoding) {
|
|
588
612
|
}
|
589
613
|
}
|
590
614
|
|
591
|
-
Buffer.isBuffer = function (b) {
|
592
|
-
return !!(b != null && b._isBuffer)
|
593
|
-
}
|
594
|
-
|
595
|
-
Buffer.byteLength = function (str, encoding) {
|
596
|
-
var ret
|
597
|
-
str = str.toString()
|
598
|
-
switch (encoding || 'utf8') {
|
599
|
-
case 'hex':
|
600
|
-
ret = str.length / 2
|
601
|
-
break
|
602
|
-
case 'utf8':
|
603
|
-
case 'utf-8':
|
604
|
-
ret = utf8ToBytes(str).length
|
605
|
-
break
|
606
|
-
case 'ascii':
|
607
|
-
case 'binary':
|
608
|
-
case 'raw':
|
609
|
-
ret = str.length
|
610
|
-
break
|
611
|
-
case 'base64':
|
612
|
-
ret = base64ToBytes(str).length
|
613
|
-
break
|
614
|
-
case 'ucs2':
|
615
|
-
case 'ucs-2':
|
616
|
-
case 'utf16le':
|
617
|
-
case 'utf-16le':
|
618
|
-
ret = str.length * 2
|
619
|
-
break
|
620
|
-
default:
|
621
|
-
throw new Error('Unknown encoding')
|
622
|
-
}
|
623
|
-
return ret
|
624
|
-
}
|
625
|
-
|
626
615
|
Buffer.concat = function (list, totalLength) {
|
627
|
-
|
616
|
+
if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])')
|
628
617
|
|
629
618
|
if (list.length === 0) {
|
630
619
|
return new Buffer(0)
|
@@ -650,26 +639,118 @@ Buffer.concat = function (list, totalLength) {
|
|
650
639
|
return buf
|
651
640
|
}
|
652
641
|
|
653
|
-
Buffer.
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
642
|
+
Buffer.byteLength = function (str, encoding) {
|
643
|
+
var ret
|
644
|
+
str = str + ''
|
645
|
+
switch (encoding || 'utf8') {
|
646
|
+
case 'ascii':
|
647
|
+
case 'binary':
|
648
|
+
case 'raw':
|
649
|
+
ret = str.length
|
650
|
+
break
|
651
|
+
case 'ucs2':
|
652
|
+
case 'ucs-2':
|
653
|
+
case 'utf16le':
|
654
|
+
case 'utf-16le':
|
655
|
+
ret = str.length * 2
|
656
|
+
break
|
657
|
+
case 'hex':
|
658
|
+
ret = str.length >>> 1
|
659
|
+
break
|
660
|
+
case 'utf8':
|
661
|
+
case 'utf-8':
|
662
|
+
ret = utf8ToBytes(str).length
|
663
|
+
break
|
664
|
+
case 'base64':
|
665
|
+
ret = base64ToBytes(str).length
|
666
|
+
break
|
667
|
+
default:
|
668
|
+
ret = str.length
|
664
669
|
}
|
665
|
-
|
666
|
-
|
670
|
+
return ret
|
671
|
+
}
|
672
|
+
|
673
|
+
// pre-set for values that may exist in the future
|
674
|
+
Buffer.prototype.length = undefined
|
675
|
+
Buffer.prototype.parent = undefined
|
676
|
+
|
677
|
+
// toString(encoding, start=0, end=buffer.length)
|
678
|
+
Buffer.prototype.toString = function (encoding, start, end) {
|
679
|
+
var loweredCase = false
|
680
|
+
|
681
|
+
start = start >>> 0
|
682
|
+
end = end === undefined || end === Infinity ? this.length : end >>> 0
|
683
|
+
|
684
|
+
if (!encoding) encoding = 'utf8'
|
685
|
+
if (start < 0) start = 0
|
686
|
+
if (end > this.length) end = this.length
|
687
|
+
if (end <= start) return ''
|
688
|
+
|
689
|
+
while (true) {
|
690
|
+
switch (encoding) {
|
691
|
+
case 'hex':
|
692
|
+
return hexSlice(this, start, end)
|
693
|
+
|
694
|
+
case 'utf8':
|
695
|
+
case 'utf-8':
|
696
|
+
return utf8Slice(this, start, end)
|
697
|
+
|
698
|
+
case 'ascii':
|
699
|
+
return asciiSlice(this, start, end)
|
700
|
+
|
701
|
+
case 'binary':
|
702
|
+
return binarySlice(this, start, end)
|
703
|
+
|
704
|
+
case 'base64':
|
705
|
+
return base64Slice(this, start, end)
|
706
|
+
|
707
|
+
case 'ucs2':
|
708
|
+
case 'ucs-2':
|
709
|
+
case 'utf16le':
|
710
|
+
case 'utf-16le':
|
711
|
+
return utf16leSlice(this, start, end)
|
712
|
+
|
713
|
+
default:
|
714
|
+
if (loweredCase)
|
715
|
+
throw new TypeError('Unknown encoding: ' + encoding)
|
716
|
+
encoding = (encoding + '').toLowerCase()
|
717
|
+
loweredCase = true
|
718
|
+
}
|
667
719
|
}
|
668
|
-
return 0
|
669
720
|
}
|
670
721
|
|
671
|
-
|
672
|
-
|
722
|
+
Buffer.prototype.equals = function (b) {
|
723
|
+
if(!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
724
|
+
return Buffer.compare(this, b) === 0
|
725
|
+
}
|
726
|
+
|
727
|
+
Buffer.prototype.inspect = function () {
|
728
|
+
var str = ''
|
729
|
+
var max = exports.INSPECT_MAX_BYTES
|
730
|
+
if (this.length > 0) {
|
731
|
+
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
|
732
|
+
if (this.length > max)
|
733
|
+
str += ' ... '
|
734
|
+
}
|
735
|
+
return '<Buffer ' + str + '>'
|
736
|
+
}
|
737
|
+
|
738
|
+
Buffer.prototype.compare = function (b) {
|
739
|
+
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
|
740
|
+
return Buffer.compare(this, b)
|
741
|
+
}
|
742
|
+
|
743
|
+
// `get` will be removed in Node 0.13+
|
744
|
+
Buffer.prototype.get = function (offset) {
|
745
|
+
console.log('.get() is deprecated. Access using array indexes instead.')
|
746
|
+
return this.readUInt8(offset)
|
747
|
+
}
|
748
|
+
|
749
|
+
// `set` will be removed in Node 0.13+
|
750
|
+
Buffer.prototype.set = function (v, offset) {
|
751
|
+
console.log('.set() is deprecated. Access using array indexes instead.')
|
752
|
+
return this.writeUInt8(v, offset)
|
753
|
+
}
|
673
754
|
|
674
755
|
function hexWrite (buf, string, offset, length) {
|
675
756
|
offset = Number(offset) || 0
|
@@ -685,14 +766,14 @@ function hexWrite (buf, string, offset, length) {
|
|
685
766
|
|
686
767
|
// must be an even number of digits
|
687
768
|
var strLen = string.length
|
688
|
-
|
769
|
+
if (strLen % 2 !== 0) throw new Error('Invalid hex string')
|
689
770
|
|
690
771
|
if (length > strLen / 2) {
|
691
772
|
length = strLen / 2
|
692
773
|
}
|
693
774
|
for (var i = 0; i < length; i++) {
|
694
775
|
var byte = parseInt(string.substr(i * 2, 2), 16)
|
695
|
-
|
776
|
+
if (isNaN(byte)) throw new Error('Invalid hex string')
|
696
777
|
buf[offset + i] = byte
|
697
778
|
}
|
698
779
|
return i
|
@@ -774,48 +855,7 @@ Buffer.prototype.write = function (string, offset, length, encoding) {
|
|
774
855
|
ret = utf16leWrite(this, string, offset, length)
|
775
856
|
break
|
776
857
|
default:
|
777
|
-
throw new
|
778
|
-
}
|
779
|
-
return ret
|
780
|
-
}
|
781
|
-
|
782
|
-
Buffer.prototype.toString = function (encoding, start, end) {
|
783
|
-
var self = this
|
784
|
-
|
785
|
-
encoding = String(encoding || 'utf8').toLowerCase()
|
786
|
-
start = Number(start) || 0
|
787
|
-
end = (end === undefined) ? self.length : Number(end)
|
788
|
-
|
789
|
-
// Fastpath empty strings
|
790
|
-
if (end === start)
|
791
|
-
return ''
|
792
|
-
|
793
|
-
var ret
|
794
|
-
switch (encoding) {
|
795
|
-
case 'hex':
|
796
|
-
ret = hexSlice(self, start, end)
|
797
|
-
break
|
798
|
-
case 'utf8':
|
799
|
-
case 'utf-8':
|
800
|
-
ret = utf8Slice(self, start, end)
|
801
|
-
break
|
802
|
-
case 'ascii':
|
803
|
-
ret = asciiSlice(self, start, end)
|
804
|
-
break
|
805
|
-
case 'binary':
|
806
|
-
ret = binarySlice(self, start, end)
|
807
|
-
break
|
808
|
-
case 'base64':
|
809
|
-
ret = base64Slice(self, start, end)
|
810
|
-
break
|
811
|
-
case 'ucs2':
|
812
|
-
case 'ucs-2':
|
813
|
-
case 'utf16le':
|
814
|
-
case 'utf-16le':
|
815
|
-
ret = utf16leSlice(self, start, end)
|
816
|
-
break
|
817
|
-
default:
|
818
|
-
throw new Error('Unknown encoding')
|
858
|
+
throw new TypeError('Unknown encoding: ' + encoding)
|
819
859
|
}
|
820
860
|
return ret
|
821
861
|
}
|
@@ -827,52 +867,6 @@ Buffer.prototype.toJSON = function () {
|
|
827
867
|
}
|
828
868
|
}
|
829
869
|
|
830
|
-
Buffer.prototype.equals = function (b) {
|
831
|
-
assert(Buffer.isBuffer(b), 'Argument must be a Buffer')
|
832
|
-
return Buffer.compare(this, b) === 0
|
833
|
-
}
|
834
|
-
|
835
|
-
Buffer.prototype.compare = function (b) {
|
836
|
-
assert(Buffer.isBuffer(b), 'Argument must be a Buffer')
|
837
|
-
return Buffer.compare(this, b)
|
838
|
-
}
|
839
|
-
|
840
|
-
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
841
|
-
Buffer.prototype.copy = function (target, target_start, start, end) {
|
842
|
-
var source = this
|
843
|
-
|
844
|
-
if (!start) start = 0
|
845
|
-
if (!end && end !== 0) end = this.length
|
846
|
-
if (!target_start) target_start = 0
|
847
|
-
|
848
|
-
// Copy 0 bytes; we're done
|
849
|
-
if (end === start) return
|
850
|
-
if (target.length === 0 || source.length === 0) return
|
851
|
-
|
852
|
-
// Fatal error conditions
|
853
|
-
assert(end >= start, 'sourceEnd < sourceStart')
|
854
|
-
assert(target_start >= 0 && target_start < target.length,
|
855
|
-
'targetStart out of bounds')
|
856
|
-
assert(start >= 0 && start < source.length, 'sourceStart out of bounds')
|
857
|
-
assert(end >= 0 && end <= source.length, 'sourceEnd out of bounds')
|
858
|
-
|
859
|
-
// Are we oob?
|
860
|
-
if (end > this.length)
|
861
|
-
end = this.length
|
862
|
-
if (target.length - target_start < end - start)
|
863
|
-
end = target.length - target_start + start
|
864
|
-
|
865
|
-
var len = end - start
|
866
|
-
|
867
|
-
if (len < 100 || !TYPED_ARRAY_SUPPORT) {
|
868
|
-
for (var i = 0; i < len; i++) {
|
869
|
-
target[i + target_start] = this[i + start]
|
870
|
-
}
|
871
|
-
} else {
|
872
|
-
target._set(this.subarray(start, start + len), target_start)
|
873
|
-
}
|
874
|
-
}
|
875
|
-
|
876
870
|
function base64Slice (buf, start, end) {
|
877
871
|
if (start === 0 && end === buf.length) {
|
878
872
|
return base64.fromByteArray(buf)
|
@@ -958,7 +952,7 @@ Buffer.prototype.slice = function (start, end) {
|
|
958
952
|
if (end < start)
|
959
953
|
end = start
|
960
954
|
|
961
|
-
if (TYPED_ARRAY_SUPPORT) {
|
955
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
962
956
|
return Buffer._augment(this.subarray(start, end))
|
963
957
|
} else {
|
964
958
|
var sliceLen = end - start
|
@@ -970,365 +964,275 @@ Buffer.prototype.slice = function (start, end) {
|
|
970
964
|
}
|
971
965
|
}
|
972
966
|
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
console.log('.set() is deprecated. Access using array indexes instead.')
|
982
|
-
return this.writeUInt8(v, offset)
|
967
|
+
/*
|
968
|
+
* Need to make sure that buffer isn't trying to write out of bounds.
|
969
|
+
*/
|
970
|
+
function checkOffset (offset, ext, length) {
|
971
|
+
if ((offset % 1) !== 0 || offset < 0)
|
972
|
+
throw new RangeError('offset is not uint')
|
973
|
+
if (offset + ext > length)
|
974
|
+
throw new RangeError('Trying to access beyond buffer length')
|
983
975
|
}
|
984
976
|
|
985
977
|
Buffer.prototype.readUInt8 = function (offset, noAssert) {
|
986
|
-
if (!noAssert)
|
987
|
-
|
988
|
-
assert(offset < this.length, 'Trying to read beyond buffer length')
|
989
|
-
}
|
990
|
-
|
991
|
-
if (offset >= this.length)
|
992
|
-
return
|
993
|
-
|
978
|
+
if (!noAssert)
|
979
|
+
checkOffset(offset, 1, this.length)
|
994
980
|
return this[offset]
|
995
981
|
}
|
996
982
|
|
997
|
-
function readUInt16 (buf, offset, littleEndian, noAssert) {
|
998
|
-
if (!noAssert) {
|
999
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1000
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1001
|
-
assert(offset + 1 < buf.length, 'Trying to read beyond buffer length')
|
1002
|
-
}
|
1003
|
-
|
1004
|
-
var len = buf.length
|
1005
|
-
if (offset >= len)
|
1006
|
-
return
|
1007
|
-
|
1008
|
-
var val
|
1009
|
-
if (littleEndian) {
|
1010
|
-
val = buf[offset]
|
1011
|
-
if (offset + 1 < len)
|
1012
|
-
val |= buf[offset + 1] << 8
|
1013
|
-
} else {
|
1014
|
-
val = buf[offset] << 8
|
1015
|
-
if (offset + 1 < len)
|
1016
|
-
val |= buf[offset + 1]
|
1017
|
-
}
|
1018
|
-
return val
|
1019
|
-
}
|
1020
|
-
|
1021
983
|
Buffer.prototype.readUInt16LE = function (offset, noAssert) {
|
1022
|
-
|
984
|
+
if (!noAssert)
|
985
|
+
checkOffset(offset, 2, this.length)
|
986
|
+
return this[offset] | (this[offset + 1] << 8)
|
1023
987
|
}
|
1024
988
|
|
1025
989
|
Buffer.prototype.readUInt16BE = function (offset, noAssert) {
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
function readUInt32 (buf, offset, littleEndian, noAssert) {
|
1030
|
-
if (!noAssert) {
|
1031
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1032
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1033
|
-
assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
|
1034
|
-
}
|
1035
|
-
|
1036
|
-
var len = buf.length
|
1037
|
-
if (offset >= len)
|
1038
|
-
return
|
1039
|
-
|
1040
|
-
var val
|
1041
|
-
if (littleEndian) {
|
1042
|
-
if (offset + 2 < len)
|
1043
|
-
val = buf[offset + 2] << 16
|
1044
|
-
if (offset + 1 < len)
|
1045
|
-
val |= buf[offset + 1] << 8
|
1046
|
-
val |= buf[offset]
|
1047
|
-
if (offset + 3 < len)
|
1048
|
-
val = val + (buf[offset + 3] << 24 >>> 0)
|
1049
|
-
} else {
|
1050
|
-
if (offset + 1 < len)
|
1051
|
-
val = buf[offset + 1] << 16
|
1052
|
-
if (offset + 2 < len)
|
1053
|
-
val |= buf[offset + 2] << 8
|
1054
|
-
if (offset + 3 < len)
|
1055
|
-
val |= buf[offset + 3]
|
1056
|
-
val = val + (buf[offset] << 24 >>> 0)
|
1057
|
-
}
|
1058
|
-
return val
|
990
|
+
if (!noAssert)
|
991
|
+
checkOffset(offset, 2, this.length)
|
992
|
+
return (this[offset] << 8) | this[offset + 1]
|
1059
993
|
}
|
1060
994
|
|
1061
995
|
Buffer.prototype.readUInt32LE = function (offset, noAssert) {
|
1062
|
-
|
1063
|
-
|
996
|
+
if (!noAssert)
|
997
|
+
checkOffset(offset, 4, this.length)
|
1064
998
|
|
1065
|
-
|
1066
|
-
|
999
|
+
return ((this[offset]) |
|
1000
|
+
(this[offset + 1] << 8) |
|
1001
|
+
(this[offset + 2] << 16)) +
|
1002
|
+
(this[offset + 3] * 0x1000000)
|
1067
1003
|
}
|
1068
1004
|
|
1069
|
-
Buffer.prototype.
|
1070
|
-
if (!noAssert)
|
1071
|
-
|
1072
|
-
'missing offset')
|
1073
|
-
assert(offset < this.length, 'Trying to read beyond buffer length')
|
1074
|
-
}
|
1075
|
-
|
1076
|
-
if (offset >= this.length)
|
1077
|
-
return
|
1005
|
+
Buffer.prototype.readUInt32BE = function (offset, noAssert) {
|
1006
|
+
if (!noAssert)
|
1007
|
+
checkOffset(offset, 4, this.length)
|
1078
1008
|
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
return this[offset]
|
1009
|
+
return (this[offset] * 0x1000000) +
|
1010
|
+
((this[offset + 1] << 16) |
|
1011
|
+
(this[offset + 2] << 8) |
|
1012
|
+
this[offset + 3])
|
1084
1013
|
}
|
1085
1014
|
|
1086
|
-
function
|
1087
|
-
if (!noAssert)
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
var len = buf.length
|
1094
|
-
if (offset >= len)
|
1095
|
-
return
|
1096
|
-
|
1097
|
-
var val = readUInt16(buf, offset, littleEndian, true)
|
1098
|
-
var neg = val & 0x8000
|
1099
|
-
if (neg)
|
1100
|
-
return (0xffff - val + 1) * -1
|
1101
|
-
else
|
1102
|
-
return val
|
1015
|
+
Buffer.prototype.readInt8 = function (offset, noAssert) {
|
1016
|
+
if (!noAssert)
|
1017
|
+
checkOffset(offset, 1, this.length)
|
1018
|
+
if (!(this[offset] & 0x80))
|
1019
|
+
return (this[offset])
|
1020
|
+
return ((0xff - this[offset] + 1) * -1)
|
1103
1021
|
}
|
1104
1022
|
|
1105
1023
|
Buffer.prototype.readInt16LE = function (offset, noAssert) {
|
1106
|
-
|
1024
|
+
if (!noAssert)
|
1025
|
+
checkOffset(offset, 2, this.length)
|
1026
|
+
var val = this[offset] | (this[offset + 1] << 8)
|
1027
|
+
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
1107
1028
|
}
|
1108
1029
|
|
1109
1030
|
Buffer.prototype.readInt16BE = function (offset, noAssert) {
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
if (!noAssert) {
|
1115
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1116
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1117
|
-
assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
|
1118
|
-
}
|
1119
|
-
|
1120
|
-
var len = buf.length
|
1121
|
-
if (offset >= len)
|
1122
|
-
return
|
1123
|
-
|
1124
|
-
var val = readUInt32(buf, offset, littleEndian, true)
|
1125
|
-
var neg = val & 0x80000000
|
1126
|
-
if (neg)
|
1127
|
-
return (0xffffffff - val + 1) * -1
|
1128
|
-
else
|
1129
|
-
return val
|
1031
|
+
if (!noAssert)
|
1032
|
+
checkOffset(offset, 2, this.length)
|
1033
|
+
var val = this[offset + 1] | (this[offset] << 8)
|
1034
|
+
return (val & 0x8000) ? val | 0xFFFF0000 : val
|
1130
1035
|
}
|
1131
1036
|
|
1132
1037
|
Buffer.prototype.readInt32LE = function (offset, noAssert) {
|
1133
|
-
|
1134
|
-
|
1038
|
+
if (!noAssert)
|
1039
|
+
checkOffset(offset, 4, this.length)
|
1135
1040
|
|
1136
|
-
|
1137
|
-
|
1041
|
+
return (this[offset]) |
|
1042
|
+
(this[offset + 1] << 8) |
|
1043
|
+
(this[offset + 2] << 16) |
|
1044
|
+
(this[offset + 3] << 24)
|
1138
1045
|
}
|
1139
1046
|
|
1140
|
-
function
|
1141
|
-
if (!noAssert)
|
1142
|
-
|
1143
|
-
assert(offset + 3 < buf.length, 'Trying to read beyond buffer length')
|
1144
|
-
}
|
1047
|
+
Buffer.prototype.readInt32BE = function (offset, noAssert) {
|
1048
|
+
if (!noAssert)
|
1049
|
+
checkOffset(offset, 4, this.length)
|
1145
1050
|
|
1146
|
-
return
|
1051
|
+
return (this[offset] << 24) |
|
1052
|
+
(this[offset + 1] << 16) |
|
1053
|
+
(this[offset + 2] << 8) |
|
1054
|
+
(this[offset + 3])
|
1147
1055
|
}
|
1148
1056
|
|
1149
1057
|
Buffer.prototype.readFloatLE = function (offset, noAssert) {
|
1150
|
-
|
1058
|
+
if (!noAssert)
|
1059
|
+
checkOffset(offset, 4, this.length)
|
1060
|
+
return ieee754.read(this, offset, true, 23, 4)
|
1151
1061
|
}
|
1152
1062
|
|
1153
1063
|
Buffer.prototype.readFloatBE = function (offset, noAssert) {
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
function readDouble (buf, offset, littleEndian, noAssert) {
|
1158
|
-
if (!noAssert) {
|
1159
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1160
|
-
assert(offset + 7 < buf.length, 'Trying to read beyond buffer length')
|
1161
|
-
}
|
1162
|
-
|
1163
|
-
return ieee754.read(buf, offset, littleEndian, 52, 8)
|
1064
|
+
if (!noAssert)
|
1065
|
+
checkOffset(offset, 4, this.length)
|
1066
|
+
return ieee754.read(this, offset, false, 23, 4)
|
1164
1067
|
}
|
1165
1068
|
|
1166
1069
|
Buffer.prototype.readDoubleLE = function (offset, noAssert) {
|
1167
|
-
|
1070
|
+
if (!noAssert)
|
1071
|
+
checkOffset(offset, 8, this.length)
|
1072
|
+
return ieee754.read(this, offset, true, 52, 8)
|
1168
1073
|
}
|
1169
1074
|
|
1170
1075
|
Buffer.prototype.readDoubleBE = function (offset, noAssert) {
|
1171
|
-
|
1076
|
+
if (!noAssert)
|
1077
|
+
checkOffset(offset, 8, this.length)
|
1078
|
+
return ieee754.read(this, offset, false, 52, 8)
|
1172
1079
|
}
|
1173
1080
|
|
1174
|
-
|
1175
|
-
if (!
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
verifuint(value, 0xff)
|
1180
|
-
}
|
1181
|
-
|
1182
|
-
if (offset >= this.length) return
|
1081
|
+
function checkInt (buf, value, offset, ext, max, min) {
|
1082
|
+
if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')
|
1083
|
+
if (value > max || value < min) throw new TypeError('value is out of bounds')
|
1084
|
+
if (offset + ext > buf.length) throw new TypeError('index out of range')
|
1085
|
+
}
|
1183
1086
|
|
1087
|
+
Buffer.prototype.writeUInt8 = function (value, offset, noAssert) {
|
1088
|
+
value = +value
|
1089
|
+
offset = offset >>> 0
|
1090
|
+
if (!noAssert)
|
1091
|
+
checkInt(this, value, offset, 1, 0xff, 0)
|
1092
|
+
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
1184
1093
|
this[offset] = value
|
1185
1094
|
return offset + 1
|
1186
1095
|
}
|
1187
1096
|
|
1188
|
-
function
|
1189
|
-
if (
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
assert(offset + 1 < buf.length, 'trying to write beyond buffer length')
|
1194
|
-
verifuint(value, 0xffff)
|
1097
|
+
function objectWriteUInt16 (buf, value, offset, littleEndian) {
|
1098
|
+
if (value < 0) value = 0xffff + value + 1
|
1099
|
+
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {
|
1100
|
+
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
|
1101
|
+
(littleEndian ? i : 1 - i) * 8
|
1195
1102
|
}
|
1196
|
-
|
1197
|
-
var len = buf.length
|
1198
|
-
if (offset >= len)
|
1199
|
-
return
|
1200
|
-
|
1201
|
-
for (var i = 0, j = Math.min(len - offset, 2); i < j; i++) {
|
1202
|
-
buf[offset + i] =
|
1203
|
-
(value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
|
1204
|
-
(littleEndian ? i : 1 - i) * 8
|
1205
|
-
}
|
1206
|
-
return offset + 2
|
1207
1103
|
}
|
1208
1104
|
|
1209
1105
|
Buffer.prototype.writeUInt16LE = function (value, offset, noAssert) {
|
1210
|
-
|
1106
|
+
value = +value
|
1107
|
+
offset = offset >>> 0
|
1108
|
+
if (!noAssert)
|
1109
|
+
checkInt(this, value, offset, 2, 0xffff, 0)
|
1110
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1111
|
+
this[offset] = value
|
1112
|
+
this[offset + 1] = (value >>> 8)
|
1113
|
+
} else objectWriteUInt16(this, value, offset, true)
|
1114
|
+
return offset + 2
|
1211
1115
|
}
|
1212
1116
|
|
1213
1117
|
Buffer.prototype.writeUInt16BE = function (value, offset, noAssert) {
|
1214
|
-
|
1118
|
+
value = +value
|
1119
|
+
offset = offset >>> 0
|
1120
|
+
if (!noAssert)
|
1121
|
+
checkInt(this, value, offset, 2, 0xffff, 0)
|
1122
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1123
|
+
this[offset] = (value >>> 8)
|
1124
|
+
this[offset + 1] = value
|
1125
|
+
} else objectWriteUInt16(this, value, offset, false)
|
1126
|
+
return offset + 2
|
1215
1127
|
}
|
1216
1128
|
|
1217
|
-
function
|
1218
|
-
if (
|
1219
|
-
|
1220
|
-
|
1221
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1222
|
-
assert(offset + 3 < buf.length, 'trying to write beyond buffer length')
|
1223
|
-
verifuint(value, 0xffffffff)
|
1224
|
-
}
|
1225
|
-
|
1226
|
-
var len = buf.length
|
1227
|
-
if (offset >= len)
|
1228
|
-
return
|
1229
|
-
|
1230
|
-
for (var i = 0, j = Math.min(len - offset, 4); i < j; i++) {
|
1231
|
-
buf[offset + i] =
|
1232
|
-
(value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
|
1129
|
+
function objectWriteUInt32 (buf, value, offset, littleEndian) {
|
1130
|
+
if (value < 0) value = 0xffffffff + value + 1
|
1131
|
+
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {
|
1132
|
+
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
|
1233
1133
|
}
|
1234
|
-
return offset + 4
|
1235
1134
|
}
|
1236
1135
|
|
1237
1136
|
Buffer.prototype.writeUInt32LE = function (value, offset, noAssert) {
|
1238
|
-
|
1137
|
+
value = +value
|
1138
|
+
offset = offset >>> 0
|
1139
|
+
if (!noAssert)
|
1140
|
+
checkInt(this, value, offset, 4, 0xffffffff, 0)
|
1141
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1142
|
+
this[offset + 3] = (value >>> 24)
|
1143
|
+
this[offset + 2] = (value >>> 16)
|
1144
|
+
this[offset + 1] = (value >>> 8)
|
1145
|
+
this[offset] = value
|
1146
|
+
} else objectWriteUInt32(this, value, offset, true)
|
1147
|
+
return offset + 4
|
1239
1148
|
}
|
1240
1149
|
|
1241
1150
|
Buffer.prototype.writeUInt32BE = function (value, offset, noAssert) {
|
1242
|
-
|
1151
|
+
value = +value
|
1152
|
+
offset = offset >>> 0
|
1153
|
+
if (!noAssert)
|
1154
|
+
checkInt(this, value, offset, 4, 0xffffffff, 0)
|
1155
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1156
|
+
this[offset] = (value >>> 24)
|
1157
|
+
this[offset + 1] = (value >>> 16)
|
1158
|
+
this[offset + 2] = (value >>> 8)
|
1159
|
+
this[offset + 3] = value
|
1160
|
+
} else objectWriteUInt32(this, value, offset, false)
|
1161
|
+
return offset + 4
|
1243
1162
|
}
|
1244
1163
|
|
1245
1164
|
Buffer.prototype.writeInt8 = function (value, offset, noAssert) {
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
if (offset >= this.length)
|
1254
|
-
return
|
1255
|
-
|
1256
|
-
if (value >= 0)
|
1257
|
-
this.writeUInt8(value, offset, noAssert)
|
1258
|
-
else
|
1259
|
-
this.writeUInt8(0xff + value + 1, offset, noAssert)
|
1165
|
+
value = +value
|
1166
|
+
offset = offset >>> 0
|
1167
|
+
if (!noAssert)
|
1168
|
+
checkInt(this, value, offset, 1, 0x7f, -0x80)
|
1169
|
+
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
|
1170
|
+
if (value < 0) value = 0xff + value + 1
|
1171
|
+
this[offset] = value
|
1260
1172
|
return offset + 1
|
1261
1173
|
}
|
1262
1174
|
|
1263
|
-
function writeInt16 (buf, value, offset, littleEndian, noAssert) {
|
1264
|
-
if (!noAssert) {
|
1265
|
-
assert(value !== undefined && value !== null, 'missing value')
|
1266
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1267
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1268
|
-
assert(offset + 1 < buf.length, 'Trying to write beyond buffer length')
|
1269
|
-
verifsint(value, 0x7fff, -0x8000)
|
1270
|
-
}
|
1271
|
-
|
1272
|
-
var len = buf.length
|
1273
|
-
if (offset >= len)
|
1274
|
-
return
|
1275
|
-
|
1276
|
-
if (value >= 0)
|
1277
|
-
writeUInt16(buf, value, offset, littleEndian, noAssert)
|
1278
|
-
else
|
1279
|
-
writeUInt16(buf, 0xffff + value + 1, offset, littleEndian, noAssert)
|
1280
|
-
return offset + 2
|
1281
|
-
}
|
1282
|
-
|
1283
1175
|
Buffer.prototype.writeInt16LE = function (value, offset, noAssert) {
|
1284
|
-
|
1176
|
+
value = +value
|
1177
|
+
offset = offset >>> 0
|
1178
|
+
if (!noAssert)
|
1179
|
+
checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
1180
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1181
|
+
this[offset] = value
|
1182
|
+
this[offset + 1] = (value >>> 8)
|
1183
|
+
} else objectWriteUInt16(this, value, offset, true)
|
1184
|
+
return offset + 2
|
1285
1185
|
}
|
1286
1186
|
|
1287
1187
|
Buffer.prototype.writeInt16BE = function (value, offset, noAssert) {
|
1288
|
-
|
1188
|
+
value = +value
|
1189
|
+
offset = offset >>> 0
|
1190
|
+
if (!noAssert)
|
1191
|
+
checkInt(this, value, offset, 2, 0x7fff, -0x8000)
|
1192
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1193
|
+
this[offset] = (value >>> 8)
|
1194
|
+
this[offset + 1] = value
|
1195
|
+
} else objectWriteUInt16(this, value, offset, false)
|
1196
|
+
return offset + 2
|
1289
1197
|
}
|
1290
1198
|
|
1291
|
-
function
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
return
|
1303
|
-
|
1304
|
-
if (value >= 0)
|
1305
|
-
writeUInt32(buf, value, offset, littleEndian, noAssert)
|
1306
|
-
else
|
1307
|
-
writeUInt32(buf, 0xffffffff + value + 1, offset, littleEndian, noAssert)
|
1199
|
+
Buffer.prototype.writeInt32LE = function (value, offset, noAssert) {
|
1200
|
+
value = +value
|
1201
|
+
offset = offset >>> 0
|
1202
|
+
if (!noAssert)
|
1203
|
+
checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
1204
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1205
|
+
this[offset] = value
|
1206
|
+
this[offset + 1] = (value >>> 8)
|
1207
|
+
this[offset + 2] = (value >>> 16)
|
1208
|
+
this[offset + 3] = (value >>> 24)
|
1209
|
+
} else objectWriteUInt32(this, value, offset, true)
|
1308
1210
|
return offset + 4
|
1309
1211
|
}
|
1310
1212
|
|
1311
|
-
Buffer.prototype.
|
1312
|
-
|
1213
|
+
Buffer.prototype.writeInt32BE = function (value, offset, noAssert) {
|
1214
|
+
value = +value
|
1215
|
+
offset = offset >>> 0
|
1216
|
+
if (!noAssert)
|
1217
|
+
checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
|
1218
|
+
if (value < 0) value = 0xffffffff + value + 1
|
1219
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1220
|
+
this[offset] = (value >>> 24)
|
1221
|
+
this[offset + 1] = (value >>> 16)
|
1222
|
+
this[offset + 2] = (value >>> 8)
|
1223
|
+
this[offset + 3] = value
|
1224
|
+
} else objectWriteUInt32(this, value, offset, false)
|
1225
|
+
return offset + 4
|
1313
1226
|
}
|
1314
1227
|
|
1315
|
-
|
1316
|
-
|
1228
|
+
function checkIEEE754 (buf, value, offset, ext, max, min) {
|
1229
|
+
if (value > max || value < min) throw new TypeError('value is out of bounds')
|
1230
|
+
if (offset + ext > buf.length) throw new TypeError('index out of range')
|
1317
1231
|
}
|
1318
1232
|
|
1319
1233
|
function writeFloat (buf, value, offset, littleEndian, noAssert) {
|
1320
|
-
if (!noAssert)
|
1321
|
-
|
1322
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1323
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1324
|
-
assert(offset + 3 < buf.length, 'Trying to write beyond buffer length')
|
1325
|
-
verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
1326
|
-
}
|
1327
|
-
|
1328
|
-
var len = buf.length
|
1329
|
-
if (offset >= len)
|
1330
|
-
return
|
1331
|
-
|
1234
|
+
if (!noAssert)
|
1235
|
+
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
|
1332
1236
|
ieee754.write(buf, value, offset, littleEndian, 23, 4)
|
1333
1237
|
return offset + 4
|
1334
1238
|
}
|
@@ -1342,19 +1246,8 @@ Buffer.prototype.writeFloatBE = function (value, offset, noAssert) {
|
|
1342
1246
|
}
|
1343
1247
|
|
1344
1248
|
function writeDouble (buf, value, offset, littleEndian, noAssert) {
|
1345
|
-
if (!noAssert)
|
1346
|
-
|
1347
|
-
assert(typeof littleEndian === 'boolean', 'missing or invalid endian')
|
1348
|
-
assert(offset !== undefined && offset !== null, 'missing offset')
|
1349
|
-
assert(offset + 7 < buf.length,
|
1350
|
-
'Trying to write beyond buffer length')
|
1351
|
-
verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
1352
|
-
}
|
1353
|
-
|
1354
|
-
var len = buf.length
|
1355
|
-
if (offset >= len)
|
1356
|
-
return
|
1357
|
-
|
1249
|
+
if (!noAssert)
|
1250
|
+
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
|
1358
1251
|
ieee754.write(buf, value, offset, littleEndian, 52, 8)
|
1359
1252
|
return offset + 8
|
1360
1253
|
}
|
@@ -1367,20 +1260,56 @@ Buffer.prototype.writeDoubleBE = function (value, offset, noAssert) {
|
|
1367
1260
|
return writeDouble(this, value, offset, false, noAssert)
|
1368
1261
|
}
|
1369
1262
|
|
1263
|
+
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
|
1264
|
+
Buffer.prototype.copy = function (target, target_start, start, end) {
|
1265
|
+
var source = this
|
1266
|
+
|
1267
|
+
if (!start) start = 0
|
1268
|
+
if (!end && end !== 0) end = this.length
|
1269
|
+
if (!target_start) target_start = 0
|
1270
|
+
|
1271
|
+
// Copy 0 bytes; we're done
|
1272
|
+
if (end === start) return
|
1273
|
+
if (target.length === 0 || source.length === 0) return
|
1274
|
+
|
1275
|
+
// Fatal error conditions
|
1276
|
+
if (end < start) throw new TypeError('sourceEnd < sourceStart')
|
1277
|
+
if (target_start < 0 || target_start >= target.length)
|
1278
|
+
throw new TypeError('targetStart out of bounds')
|
1279
|
+
if (start < 0 || start >= source.length) throw new TypeError('sourceStart out of bounds')
|
1280
|
+
if (end < 0 || end > source.length) throw new TypeError('sourceEnd out of bounds')
|
1281
|
+
|
1282
|
+
// Are we oob?
|
1283
|
+
if (end > this.length)
|
1284
|
+
end = this.length
|
1285
|
+
if (target.length - target_start < end - start)
|
1286
|
+
end = target.length - target_start + start
|
1287
|
+
|
1288
|
+
var len = end - start
|
1289
|
+
|
1290
|
+
if (len < 100 || !Buffer.TYPED_ARRAY_SUPPORT) {
|
1291
|
+
for (var i = 0; i < len; i++) {
|
1292
|
+
target[i + target_start] = this[i + start]
|
1293
|
+
}
|
1294
|
+
} else {
|
1295
|
+
target._set(this.subarray(start, start + len), target_start)
|
1296
|
+
}
|
1297
|
+
}
|
1298
|
+
|
1370
1299
|
// fill(value, start=0, end=buffer.length)
|
1371
1300
|
Buffer.prototype.fill = function (value, start, end) {
|
1372
1301
|
if (!value) value = 0
|
1373
1302
|
if (!start) start = 0
|
1374
1303
|
if (!end) end = this.length
|
1375
1304
|
|
1376
|
-
|
1305
|
+
if (end < start) throw new TypeError('end < start')
|
1377
1306
|
|
1378
1307
|
// Fill 0 bytes; we're done
|
1379
1308
|
if (end === start) return
|
1380
1309
|
if (this.length === 0) return
|
1381
1310
|
|
1382
|
-
|
1383
|
-
|
1311
|
+
if (start < 0 || start >= this.length) throw new TypeError('start out of bounds')
|
1312
|
+
if (end < 0 || end > this.length) throw new TypeError('end out of bounds')
|
1384
1313
|
|
1385
1314
|
var i
|
1386
1315
|
if (typeof value === 'number') {
|
@@ -1398,26 +1327,13 @@ Buffer.prototype.fill = function (value, start, end) {
|
|
1398
1327
|
return this
|
1399
1328
|
}
|
1400
1329
|
|
1401
|
-
Buffer.prototype.inspect = function () {
|
1402
|
-
var out = []
|
1403
|
-
var len = this.length
|
1404
|
-
for (var i = 0; i < len; i++) {
|
1405
|
-
out[i] = toHex(this[i])
|
1406
|
-
if (i === exports.INSPECT_MAX_BYTES) {
|
1407
|
-
out[i + 1] = '...'
|
1408
|
-
break
|
1409
|
-
}
|
1410
|
-
}
|
1411
|
-
return '<Buffer ' + out.join(' ') + '>'
|
1412
|
-
}
|
1413
|
-
|
1414
1330
|
/**
|
1415
1331
|
* Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.
|
1416
1332
|
* Added in Node 0.12. Only available in browsers that support ArrayBuffer.
|
1417
1333
|
*/
|
1418
1334
|
Buffer.prototype.toArrayBuffer = function () {
|
1419
1335
|
if (typeof Uint8Array !== 'undefined') {
|
1420
|
-
if (TYPED_ARRAY_SUPPORT) {
|
1336
|
+
if (Buffer.TYPED_ARRAY_SUPPORT) {
|
1421
1337
|
return (new Buffer(this)).buffer
|
1422
1338
|
} else {
|
1423
1339
|
var buf = new Uint8Array(this.length)
|
@@ -1427,7 +1343,7 @@ Buffer.prototype.toArrayBuffer = function () {
|
|
1427
1343
|
return buf.buffer
|
1428
1344
|
}
|
1429
1345
|
} else {
|
1430
|
-
throw new
|
1346
|
+
throw new TypeError('Buffer.toArrayBuffer not supported in this browser')
|
1431
1347
|
}
|
1432
1348
|
}
|
1433
1349
|
|
@@ -1510,12 +1426,6 @@ function stringtrim (str) {
|
|
1510
1426
|
return str.replace(/^\s+|\s+$/g, '')
|
1511
1427
|
}
|
1512
1428
|
|
1513
|
-
function isArray (subject) {
|
1514
|
-
return (Array.isArray || function (subject) {
|
1515
|
-
return Object.prototype.toString.call(subject) === '[object Array]'
|
1516
|
-
})(subject)
|
1517
|
-
}
|
1518
|
-
|
1519
1429
|
function isArrayish (subject) {
|
1520
1430
|
return isArray(subject) || Buffer.isBuffer(subject) ||
|
1521
1431
|
subject && typeof subject === 'object' &&
|
@@ -1589,36 +1499,7 @@ function decodeUtf8Char (str) {
|
|
1589
1499
|
}
|
1590
1500
|
}
|
1591
1501
|
|
1592
|
-
|
1593
|
-
* We have to make sure that the value is a valid integer. This means that it
|
1594
|
-
* is non-negative. It has no fractional component and that it does not
|
1595
|
-
* exceed the maximum allowed value.
|
1596
|
-
*/
|
1597
|
-
function verifuint (value, max) {
|
1598
|
-
assert(typeof value === 'number', 'cannot write a non-number as a number')
|
1599
|
-
assert(value >= 0, 'specified a negative value for writing an unsigned value')
|
1600
|
-
assert(value <= max, 'value is larger than maximum value for type')
|
1601
|
-
assert(Math.floor(value) === value, 'value has a fractional component')
|
1602
|
-
}
|
1603
|
-
|
1604
|
-
function verifsint (value, max, min) {
|
1605
|
-
assert(typeof value === 'number', 'cannot write a non-number as a number')
|
1606
|
-
assert(value <= max, 'value larger than maximum allowed value')
|
1607
|
-
assert(value >= min, 'value smaller than minimum allowed value')
|
1608
|
-
assert(Math.floor(value) === value, 'value has a fractional component')
|
1609
|
-
}
|
1610
|
-
|
1611
|
-
function verifIEEE754 (value, max, min) {
|
1612
|
-
assert(typeof value === 'number', 'cannot write a non-number as a number')
|
1613
|
-
assert(value <= max, 'value larger than maximum allowed value')
|
1614
|
-
assert(value >= min, 'value smaller than minimum allowed value')
|
1615
|
-
}
|
1616
|
-
|
1617
|
-
function assert (test, message) {
|
1618
|
-
if (!test) throw new Error(message || 'Failed assertion')
|
1619
|
-
}
|
1620
|
-
|
1621
|
-
},{"base64-js":"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js","ieee754":"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js"}],"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js":[function(require,module,exports){
|
1502
|
+
},{"base64-js":"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js","ieee754":"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js","is-array":"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/is-array/index.js"}],"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js":[function(require,module,exports){
|
1622
1503
|
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
1623
1504
|
|
1624
1505
|
;(function (exports) {
|
@@ -1826,6 +1707,41 @@ exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
|
|
1826
1707
|
buffer[offset + i - d] |= s * 128;
|
1827
1708
|
};
|
1828
1709
|
|
1710
|
+
},{}],"/Users/adamkochanowicz/Sites/kickstart/node_modules/browserify/node_modules/buffer/node_modules/is-array/index.js":[function(require,module,exports){
|
1711
|
+
|
1712
|
+
/**
|
1713
|
+
* isArray
|
1714
|
+
*/
|
1715
|
+
|
1716
|
+
var isArray = Array.isArray;
|
1717
|
+
|
1718
|
+
/**
|
1719
|
+
* toString
|
1720
|
+
*/
|
1721
|
+
|
1722
|
+
var str = Object.prototype.toString;
|
1723
|
+
|
1724
|
+
/**
|
1725
|
+
* Whether or not the given `val`
|
1726
|
+
* is an array.
|
1727
|
+
*
|
1728
|
+
* example:
|
1729
|
+
*
|
1730
|
+
* isArray([]);
|
1731
|
+
* // > true
|
1732
|
+
* isArray(arguments);
|
1733
|
+
* // > false
|
1734
|
+
* isArray('');
|
1735
|
+
* // > false
|
1736
|
+
*
|
1737
|
+
* @param {mixed} val
|
1738
|
+
* @return {bool}
|
1739
|
+
*/
|
1740
|
+
|
1741
|
+
module.exports = isArray || function (val) {
|
1742
|
+
return !! val && '[object Array]' == str.call(val);
|
1743
|
+
};
|
1744
|
+
|
1829
1745
|
},{}],"/Users/adamkochanowicz/Sites/kickstart/node_modules/chai/index.js":[function(require,module,exports){
|
1830
1746
|
module.exports = require('./lib/chai');
|
1831
1747
|
|
@@ -6361,4 +6277,4 @@ Library.prototype.test = function (obj, type) {
|
|
6361
6277
|
};
|
6362
6278
|
|
6363
6279
|
},{}]},{},["./lib/coffee/tests.coffee"])
|
6364
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9hZGFta29jaGFub3dpY3ovU2l0ZXMva2lja3N0YXJ0L25vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCIvVXNlcnMvYWRhbWtvY2hhbm93aWN6L1NpdGVzL2tpY2tzdGFydC9saWIvY29mZmVlL3Rlc3RzLmNvZmZlZSIsIi9Vc2Vycy9hZGFta29jaGFub3dpY3ovU2l0ZXMva2lja3N0YXJ0L2xpYi9jb2ZmZWUvYXBwLmNvZmZlZSIsIi9Vc2Vycy9hZGFta29jaGFub3dpY3ovU2l0ZXMva2lja3N0YXJ0L2xpYi9jb2ZmZWUvZ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XJyb3IpXG4gICAgICAgICAgLCAoZXJyIGluc3RhbmNlb2YgRXJyb3IgPyBlcnIudG9TdHJpbmcoKSA6IGVycilcbiAgICAgICAgKTtcblxuICAgICAgICBmbGFnKHRoaXMsICdvYmplY3QnLCBlcnIpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cblxuICAgICAgLy8gbmV4dCwgY2hlY2sgY29uc3RydWN0b3JcbiAgICAgIGlmIChjb25zdHJ1Y3Rvcikge1xuICAgICAgICB0aGlzLmFzc2VydChcbiAgICAgICAgICAgIGVyciBpbnN0YW5jZW9mIGNvbnN0cnVjdG9yXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyAje2V4cH0gYnV0ICN7YWN0fSB3YXMgdGhyb3duJ1xuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gbm90IHRocm93ICN7ZXhwfSBidXQgI3thY3R9IHdhcyB0aHJvd24nXG4gICAgICAgICAgLCBuYW1lXG4gICAgICAgICAgLCAoZXJyIGluc3RhbmNlb2YgRXJyb3IgPyBlcnIudG9TdHJpbmcoKSA6IGVycilcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAoIWVyck1zZykge1xuICAgICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgLy8gbmV4dCwgY2hlY2sgbWVzc2FnZVxuICAgICAgdmFyIG1lc3NhZ2UgPSAnb2JqZWN0JyA9PT0gXy50eXBlKGVycikgJiYgXCJtZXNzYWdlXCIgaW4gZXJyXG4gICAgICAgID8gZXJyLm1lc3NhZ2VcbiAgICAgICAgOiAnJyArIGVycjtcblxuICAgICAgaWYgKChtZXNzYWdlICE9IG51bGwpICYmIGVyck1zZyAmJiBlcnJNc2cgaW5zdGFuY2VvZiBSZWdFeHApIHtcbiAgICAgICAgdGhpcy5hc3NlcnQoXG4gICAgICAgICAgICBlcnJNc2cuZXhlYyhtZXNzYWdlKVxuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gdGhyb3cgZXJyb3IgbWF0Y2hpbmcgI3tleHB9IGJ1dCBnb3QgI3thY3R9J1xuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gdGhyb3cgZXJyb3Igbm90IG1hdGNoaW5nICN7ZXhwfSdcbiAgICAgICAgICAsIGVyck1zZ1xuICAgICAgICAgICwgbWVzc2FnZVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfSBlbHNlIGlmICgobWVzc2FnZSAhPSBudWxsKSAmJiBlcnJNc2cgJiYgJ3N0cmluZycgPT09IHR5cGVvZiBlcnJNc2cpIHtcbiAgICAgICAgdGhpcy5hc3NlcnQoXG4gICAgICAgICAgICB+bWVzc2FnZS5pbmRleE9mKGVyck1zZylcbiAgICAgICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIHRocm93IGVycm9yIGluY2x1ZGluZyAje2V4cH0gYnV0IGdvdCAje2FjdH0nXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyBlcnJvciBub3QgaW5jbHVkaW5nICN7YWN0fSdcbiAgICAgICAgICAsIGVyck1zZ1xuICAgICAgICAgICwgbWVzc2FnZVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3duID0gdHJ1ZTtcbiAgICAgICAgdGhyb3duRXJyb3IgPSBlcnI7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGFjdHVhbGx5R290ID0gJydcbiAgICAgICwgZXhwZWN0ZWRUaHJvd24gPSBuYW1lICE9PSBudWxsXG4gICAgICAgID8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XIpIHtcbiAgICBudW1MaW5lc0VzdCsrO1xuICAgIGlmIChjdXIuaW5kZXhPZignXFxuJykgPj0gMCkgbnVtTGluZXNFc3QrKztcbiAgICByZXR1cm4gcHJldiArIGN1ci5sZW5ndGggKyAxO1xuICB9LCAwKTtcblxuICBpZiAobGVuZ3RoID4gNjApIHtcbiAgICByZXR1cm4gYnJhY2VzWzBdICtcbiAgICAgICAgICAgKGJhc2UgPT09ICcnID8gJycgOiBiYXNlICsgJ1xcbiAnKSArXG4gICAgICAgICAgICcgJyArXG4gICAgICAgICAgIG91dHB1dC5qb2luKCcsXFxuICAnKSArXG4gICAgICAgICAgICcgJyArXG4gICAgICAgICAgIGJyYWNlc1sxXTtcbiAgfVxuXG4gIHJldHVybiBicmFjZXNbMF0gKyBiYXNlICsgJyAnICsgb3V0cHV0LmpvaW4oJywgJykgKyAnICcgKyBicmFjZXNbMV07XG59XG5cbmZ1bmN0aW9uIGlzQXJyYXkoYXIpIHtcbiAgcmV0dXJuIEFycmF5LmlzQXJyYXkoYXIpIHx8XG4gICAgICAgICAodHlwZW9mIGFyID09PSAnb2JqZWN0JyAmJiBvYmplY3RUb1N0cmluZyhhcikgPT09ICdbb2JqZWN0IEFycmF5XScpO1xufVxuXG5mdW5jdGlvbiBpc1JlZ0V4cChyZSkge1xuICByZXR1cm4gdHlwZW9mIHJlID09PSAnb2JqZWN0JyAmJiBvYmplY3RUb1N0cmluZyhyZSkgPT09ICdbb2JqZWN0IFJlZ0V4cF0nO1xufVxuXG5mdW5jdGlvbiBpc0RhdGUoZCkge1xuICByZXR1cm4gdHlwZW9mIGQgPT09ICdvYmplY3QnICYmIG9iamVjdFRvU3RyaW5nKGQpID09PSAnW29iamVjdCBEYXRlXSc7XG59XG5cbmZ1bmN0aW9uIGlzRXJyb3IoZSkge1xuICByZXR1cm4gdHlwZW9mIGUgPT09ICdvYmplY3QnICYmIG9iamVjdFRvU3RyaW5nKGUpID09PSAnW29iamVjdCBFcnJvcl0nO1xufVxuX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gICAgICAgLCAoZXJyIGluc3RhbmNlb2YgRXJyb3IgPyBlcnIudG9TdHJpbmcoKSA6IGVycilcbiAgICAgICAgKTtcblxuICAgICAgICBmbGFnKHRoaXMsICdvYmplY3QnLCBlcnIpO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgIH1cblxuICAgICAgLy8gbmV4dCwgY2hlY2sgY29uc3RydWN0b3JcbiAgICAgIGlmIChjb25zdHJ1Y3Rvcikge1xuICAgICAgICB0aGlzLmFzc2VydChcbiAgICAgICAgICAgIGVyciBpbnN0YW5jZW9mIGNvbnN0cnVjdG9yXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyAje2V4cH0gYnV0ICN7YWN0fSB3YXMgdGhyb3duJ1xuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gbm90IHRocm93ICN7ZXhwfSBidXQgI3thY3R9IHdhcyB0aHJvd24nXG4gICAgICAgICAgLCBuYW1lXG4gICAgICAgICAgLCAoZXJyIGluc3RhbmNlb2YgRXJyb3IgPyBlcnIudG9TdHJpbmcoKSA6IGVycilcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAoIWVyck1zZykge1xuICAgICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgLy8gbmV4dCwgY2hlY2sgbWVzc2FnZVxuICAgICAgdmFyIG1lc3NhZ2UgPSAnb2JqZWN0JyA9PT0gXy50eXBlKGVycikgJiYgXCJtZXNzYWdlXCIgaW4gZXJyXG4gICAgICAgID8gZXJyLm1lc3NhZ2VcbiAgICAgICAgOiAnJyArIGVycjtcblxuICAgICAgaWYgKChtZXNzYWdlICE9IG51bGwpICYmIGVyck1zZyAmJiBlcnJNc2cgaW5zdGFuY2VvZiBSZWdFeHApIHtcbiAgICAgICAgdGhpcy5hc3NlcnQoXG4gICAgICAgICAgICBlcnJNc2cuZXhlYyhtZXNzYWdlKVxuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gdGhyb3cgZXJyb3IgbWF0Y2hpbmcgI3tleHB9IGJ1dCBnb3QgI3thY3R9J1xuICAgICAgICAgICwgJ2V4cGVjdGVkICN7dGhpc30gdG8gdGhyb3cgZXJyb3Igbm90IG1hdGNoaW5nICN7ZXhwfSdcbiAgICAgICAgICAsIGVyck1zZ1xuICAgICAgICAgICwgbWVzc2FnZVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfSBlbHNlIGlmICgobWVzc2FnZSAhPSBudWxsKSAmJiBlcnJNc2cgJiYgJ3N0cmluZycgPT09IHR5cGVvZiBlcnJNc2cpIHtcbiAgICAgICAgdGhpcy5hc3NlcnQoXG4gICAgICAgICAgICB+bWVzc2FnZS5pbmRleE9mKGVyck1zZylcbiAgICAgICAgICAsICdleHBlY3RlZCAje3RoaXN9IHRvIHRocm93IGVycm9yIGluY2x1ZGluZyAje2V4cH0gYnV0IGdvdCAje2FjdH0nXG4gICAgICAgICAgLCAnZXhwZWN0ZWQgI3t0aGlzfSB0byB0aHJvdyBlcnJvciBub3QgaW5jbHVkaW5nICN7YWN0fSdcbiAgICAgICAgICAsIGVyck1zZ1xuICAgICAgICAgICwgbWVzc2FnZVxuICAgICAgICApO1xuXG4gICAgICAgIGZsYWcodGhpcywgJ29iamVjdCcsIGVycik7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdGhyb3duID0gdHJ1ZTtcbiAgICAgICAgdGhyb3duRXJyb3IgPSBlcnI7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGFjdHVhbGx5R290ID0gJydcbiAgICAgICwgZXhwZWN0ZWRUaHJvd24gPSBuYW1lICE9PSBudWxsXG4gICAgICAgID8gbmFtZVxuICAgIC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udW1MaW5lc0VzdCsrO1xuICAgIGlmIChjdXIuaW5kZXhPZignXFxuJykgPj0gMCkgbnVtTGluZXNFc3QrKztcbiAgICByZXR1cm4gcHJldiArIGN1ci5sZW5ndGggKyAxO1xuICB9LCAwKTtcblxuICBpZiAobGVuZ3RoID4gNjApIHtcbiAgICByZXR1cm4gYnJhY2VzWzBdICtcbiAgICAgICAgICAgKGJhc2UgPT09ICcnID8gJycgOiBiYXNlICsgJ1xcbiAnKSArXG4gICAgICAgICAgICcgJyArXG4gICAgICAgICAgIG91dHB1dC5qb2luKCcsXFxuICAnKSArXG4gICAgICAgICAgICcgJyArXG4gICAgICAgICAgIGJyYWNlc1sxXTtcbiAgfVxuXG4gIHJldHVybiBicmFjZXNbMF0gKyBiYXNlICsgJyAnICsgb3V0cHV0LmpvaW4oJywgJykgKyAnICcgKyBicmFjZXNbMV07XG59XG5cbmZ1bmN0aW9uIGlzQXJyYXkoYXIpIHtcbiAgcmV0dXJuIEFycmF5LmlzQXJyYXkoYXIpIHx8XG4gICAgICAgICAodHlwZW9mIGFyID09PSAnb2JqZWN0JyAmJiBvYmplY3RUb1N0cmluZyhhcikgPT09ICdbb2JqZWN0IEFycmF5XScpO1xufVxuXG5mdW5jdGlvbiBpc1JlZ0V4cChyZSkge1xuICByZXR1cm4gdHlwZW9mIHJlID09PSAnb2JqZWN0JyAmJiBvYmplY3RUb1N0cmluZyhyZSkgPT09ICdbb2JqZWN0IFJlZ0V4cF0nO1xufVxuXG5mdW5jdGlvbiBpc0RhdGUoZCkge1xuICByZXR1cm4gdHlwZW9mIGQgPT09ICdvYmplY3QnICYmIG9iamVjdFRvU3RyaW5nKGQpID09PSAnW29iamVjdCBEYXRlXSc7XG59XG5cbmZ1bmN0aW9uIGlzRXJyb3IoZSkge1xuICByZXR1cm4gdHlwZW9mIGUgPT09ICdvYmplY3QnICYmIG9iamVjdFRvU3RyaW5nKGUpID09PSAnW29iamVjdCBFcnJvcl0nO1xufVxuXG5mdW5jdGlvbi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