Comparing version 0.3.2 to 0.3.3
@@ -1,2 +0,2 @@ | ||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / | ||
/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- / | ||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */ | ||
@@ -112,3 +112,3 @@ /* | ||
if (nextByte) { | ||
throw "unexpected marker: " + ((bitsData << 8) | nextByte).toString(16); | ||
throw new Error("unexpected marker: " + ((bitsData << 8) | nextByte).toString(16)); | ||
} | ||
@@ -127,3 +127,3 @@ // unstuff 0 | ||
if (typeof node !== 'object') | ||
throw "invalid huffman sequence"; | ||
throw new Error("invalid huffman sequence"); | ||
} | ||
@@ -220,3 +220,3 @@ return null; | ||
if (s !== 1) | ||
throw "invalid ACn encoding"; | ||
throw new Error("invalid ACn encoding"); | ||
successiveACNextValue = receiveAndExtend(s); | ||
@@ -327,3 +327,3 @@ successiveACState = r ? 2 : 3; | ||
if (marker < 0xFF00) { | ||
throw "marker was not found"; | ||
throw new Error("marker was not found"); | ||
} | ||
@@ -602,3 +602,3 @@ | ||
if (fileMarker != 0xFFD8) { // SOI (Start of Image) | ||
throw "SOI not found"; | ||
throw new Error("SOI not found"); | ||
} | ||
@@ -675,3 +675,3 @@ | ||
} else | ||
throw "DQT: invalid table spec"; | ||
throw new Error("DQT: invalid table spec"); | ||
quantizationTables[quantizationTableSpec & 15] = tableData; | ||
@@ -764,3 +764,3 @@ } | ||
} | ||
throw "unknown JPEG marker " + fileMarker.toString(16); | ||
throw new Error("unknown JPEG marker " + fileMarker.toString(16)); | ||
} | ||
@@ -770,3 +770,3 @@ fileMarker = readUint16(); | ||
if (frames.length != 1) | ||
throw "only single frame JPEGs supported"; | ||
throw new Error("only single frame JPEGs supported"); | ||
@@ -773,0 +773,0 @@ // set each frame's components quantization table |
{ | ||
"name": "jpeg-js", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "A pure javascript JPEG encoder and decoder", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4850235
1