@jsquash/webp
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,2 +1,14 @@ | ||
/** | ||
* Copyright 2020 Google Inc. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
export default function decode(buffer: ArrayBuffer): Promise<ImageData>; | ||
//# sourceMappingURL=decode.d.ts.map |
@@ -0,1 +1,13 @@ | ||
/** | ||
* Copyright 2020 Google Inc. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { initEmscriptenModule } from './utils'; | ||
@@ -8,7 +20,4 @@ let emscriptenModule; | ||
} | ||
const [module, data] = await Promise.all([ | ||
emscriptenModule, | ||
buffer, | ||
]); | ||
const result = module.decode(data); | ||
const module = await emscriptenModule; | ||
const result = module.decode(buffer); | ||
if (!result) | ||
@@ -15,0 +24,0 @@ throw new Error('Decoding error'); |
@@ -0,3 +1,15 @@ | ||
/** | ||
* Copyright 2020 Google Inc. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import type { EncodeOptions } from './meta'; | ||
export default function encode(data: ImageData, options?: Partial<EncodeOptions>): Promise<ArrayBuffer>; | ||
//# sourceMappingURL=encode.d.ts.map |
@@ -0,1 +1,13 @@ | ||
/** | ||
* Copyright 2020 Google Inc. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import { defaultOptions } from './meta'; | ||
@@ -2,0 +14,0 @@ import { initEmscriptenModule } from './utils'; |
{ | ||
"name": "@jsquash/webp", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
"description": "Wasm webp encoder and decoder supporting the browser. Repackaged from Squoosh App.", | ||
"type": "module", | ||
"repository": "jamsinclair/jSquash", | ||
@@ -24,3 +23,3 @@ "author": { | ||
"clean": "rm -rf dist", | ||
"build": "npm run clean && tsc && cp -r codec package.json dist" | ||
"build": "npm run clean && tsc && cp -r codec package.json .npmignore dist" | ||
}, | ||
@@ -32,3 +31,5 @@ "dependencies": { | ||
"typescript": "^4.4.4" | ||
} | ||
}, | ||
"type": "module", | ||
"sideEffects": false | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
1
12
951938
32
665