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

@daeinc/draw

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daeinc/draw - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

1

dist/draw.esm.js

@@ -0,1 +1,2 @@

/*! @daeinc/draw@0.6.0 by Daeinc - MIT */
var l=(n,e,o)=>{n.beginPath(),n.arc(e[0],e[1],o*.5,0,Math.PI*2);},i=(n,e,o)=>{n.fillText(e,o[0],o[1]);},P=(n,e,o)=>{n.beginPath(),n.moveTo(e[0],e[1]),n.lineTo(o[0],o[1]);},a=(n,e,o=!1)=>{n.beginPath(),n.moveTo(e[0][0],e[0][1]);for(let r=1;r<e.length;r++)n.lineTo(e[r][0],e[r][1]);o&&n.closePath();},s=(n,e,o,r="corner")=>{if(n.beginPath(),r==="corner")n.rect(e[0],e[1],o[0],o[1]);else if(r==="center")n.rect(e[0]-o[0]/2,e[1]-o[1]/2,o[0],o[1]);else throw new Error(`drawRect() does not support mode: ${r}`)},d=(n,e,o,r,t="corner")=>{n.beginPath(),t==="corner"?n.roundRect(e[0],e[1],o[0],o[1],r||0):t==="center"&&n.roundRect(e[0]-o[0]/2,e[1]-o[1]/2,o[0],o[1],r||0);},g=(n,e,o=!1)=>{n.beginPath(),n.moveTo(e[0][0],e[0][1]),n.lineTo(e[1][0],e[1][1]),n.lineTo(e[2][0],e[2][1]);for(let t=3;t<e.length-3;t+=3)n.quadraticCurveTo(e[t][0],e[t][1],e[t+1][0],e[t+1][1]),n.lineTo(e[t+2][0],e[t+2][1]);let r=e[e.length-1];n.lineTo(r[0],r[1]),o&&n.closePath();};

@@ -2,0 +3,0 @@

4

dist/index.js

@@ -1,2 +0,4 @@

// index.ts
/*! @daeinc/draw@0.6.0 by Daeinc - MIT */
// src/index.ts
var drawCircle = (ctx, pt, diam) => {

@@ -3,0 +5,0 @@ ctx.beginPath();

{
"name": "@daeinc/draw",
"version": "0.6.0",
"version": "0.6.1",
"description": "drawing utilities for HTML5 Canvas",

@@ -5,0 +5,0 @@ "types": "./dist/index.d.ts",

@@ -17,2 +17,8 @@ # @daeinc/draw

## CDN
```js
import { ... } from "https://cdn.jsdelivr.net/npm/@daeinc/draw/dist/draw.esm.js"
```
## Functions

@@ -38,3 +44,3 @@

msg: string,
pt: Pt
pt: Pt,
) => void;

@@ -55,3 +61,3 @@ ```

path: Pts,
close?: boolean
close?: boolean,
) => void;

@@ -58,0 +64,0 @@ ```

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