New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@jsquash/webp

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsquash/webp - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

12

decode.d.ts

@@ -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

19

decode.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc