Enable the no-var
rule in the src/core/ascii_85_stream.js
file
This commit is contained in:
parent
3294d4d5a3
commit
f6c7a65202
@ -12,12 +12,11 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable no-var */
|
|
||||||
|
|
||||||
import { DecodeStream } from "./stream.js";
|
import { DecodeStream } from "./stream.js";
|
||||||
import { isWhiteSpace } from "./core_utils.js";
|
import { isWhiteSpace } from "./core_utils.js";
|
||||||
|
|
||||||
var Ascii85Stream = (function Ascii85StreamClosure() {
|
const Ascii85Stream = (function Ascii85StreamClosure() {
|
||||||
// eslint-disable-next-line no-shadow
|
// eslint-disable-next-line no-shadow
|
||||||
function Ascii85Stream(str, maybeLength) {
|
function Ascii85Stream(str, maybeLength) {
|
||||||
this.str = str;
|
this.str = str;
|
||||||
@ -35,13 +34,13 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
|
|||||||
Ascii85Stream.prototype = Object.create(DecodeStream.prototype);
|
Ascii85Stream.prototype = Object.create(DecodeStream.prototype);
|
||||||
|
|
||||||
Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() {
|
Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() {
|
||||||
var TILDA_CHAR = 0x7e; // '~'
|
const TILDA_CHAR = 0x7e; // '~'
|
||||||
var Z_LOWER_CHAR = 0x7a; // 'z'
|
const Z_LOWER_CHAR = 0x7a; // 'z'
|
||||||
var EOF = -1;
|
const EOF = -1;
|
||||||
|
|
||||||
var str = this.str;
|
const str = this.str;
|
||||||
|
|
||||||
var c = str.getByte();
|
let c = str.getByte();
|
||||||
while (isWhiteSpace(c)) {
|
while (isWhiteSpace(c)) {
|
||||||
c = str.getByte();
|
c = str.getByte();
|
||||||
}
|
}
|
||||||
@ -51,9 +50,8 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bufferLength = this.bufferLength,
|
const bufferLength = this.bufferLength;
|
||||||
buffer;
|
let buffer, i;
|
||||||
var i;
|
|
||||||
|
|
||||||
// special code for z
|
// special code for z
|
||||||
if (c === Z_LOWER_CHAR) {
|
if (c === Z_LOWER_CHAR) {
|
||||||
@ -63,7 +61,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
|
|||||||
}
|
}
|
||||||
this.bufferLength += 4;
|
this.bufferLength += 4;
|
||||||
} else {
|
} else {
|
||||||
var input = this.input;
|
const input = this.input;
|
||||||
input[0] = c;
|
input[0] = c;
|
||||||
for (i = 1; i < 5; ++i) {
|
for (i = 1; i < 5; ++i) {
|
||||||
c = str.getByte();
|
c = str.getByte();
|
||||||
@ -87,7 +85,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
|
|||||||
}
|
}
|
||||||
this.eof = true;
|
this.eof = true;
|
||||||
}
|
}
|
||||||
var t = 0;
|
let t = 0;
|
||||||
for (i = 0; i < 5; ++i) {
|
for (i = 0; i < 5; ++i) {
|
||||||
t = t * 85 + (input[i] - 0x21);
|
t = t * 85 + (input[i] - 0x21);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user