Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

canvas-context

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

canvas-context - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

9

CHANGELOG.md

@@ -5,2 +5,11 @@ # Changelog

## [3.0.2](https://github.com/dmnsgn/canvas-context/compare/v3.0.1...v3.0.2) (2021-04-14)
### Bug Fixes
* export types ([99c61bd](https://github.com/dmnsgn/canvas-context/commit/99c61bdf267b01410fd449f10c68b69196b412ed))
## [3.0.1](https://github.com/dmnsgn/canvas-context/compare/v3.0.0...v3.0.1) (2021-03-22)

@@ -7,0 +16,0 @@

6

index.js

@@ -19,5 +19,5 @@ /**

* @alias module:createCanvasContext
* @param {ContextType} [contextType="2d"]
* @param {CanvasContextOptions} [options={}]
* @returns {CanvasContextReturnValue}
* @param {import("./types.js").ContextType} [contextType="2d"]
* @param {import("./types.js").CanvasContextOptions} [options={}]
* @returns {import("./types.js").CanvasContextReturnValue}
*/

@@ -24,0 +24,0 @@ function createCanvasContext(contextType = "2d", options = {}) {

{
"name": "canvas-context",
"version": "3.0.1",
"version": "3.0.2",
"description": "Create a RenderingContext (2d, webgl, webgl2, bitmaprenderer, gpupresent), optionally offscreen for possible use in a Worker.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -19,1 +19,3 @@ /**

*/
export {};

@@ -6,6 +6,6 @@ export default createCanvasContext;

* @alias module:createCanvasContext
* @param {ContextType} [contextType="2d"]
* @param {CanvasContextOptions} [options={}]
* @returns {CanvasContextReturnValue}
* @param {import("./types.js").ContextType} [contextType="2d"]
* @param {import("./types.js").CanvasContextOptions} [options={}]
* @returns {import("./types.js").CanvasContextReturnValue}
*/
declare function createCanvasContext(contextType?: ContextType, options?: CanvasContextOptions): CanvasContextReturnValue;
declare function createCanvasContext(contextType?: import("./types.js").ContextType, options?: import("./types.js").CanvasContextOptions): import("./types.js").CanvasContextReturnValue;
/**
* A DOMString containing the context identifier defining the drawing context associated to the canvas.
*/
type ContextType = "2d" | "webgl" | "experimental-webgl" | "webgl2" | "webgl2-compute" | "bitmaprenderer" | "gpupresent";
export type ContextType = "2d" | "webgl" | "experimental-webgl" | "webgl2" | "webgl2-compute" | "bitmaprenderer" | "gpupresent";
/**
* Options for canvas creation. All optional.
*/
type CanvasContextOptions = {
export type CanvasContextOptions = {
/**

@@ -30,5 +30,5 @@ * Request an initial canvas width.

};
type CanvasContextReturnValue = {
export type CanvasContextReturnValue = {
canvas: HTMLCanvasElement | OffscreenCanvas;
context: RenderingContext;
};
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