Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
With can-draw
, you CAN DRAW canvas more conveniently.
<div id="container"></div>
<!-- cdn -->
<script src="https://unpkg.com/can-draw@0.1.1-1/dist/umd/can-draw.min.js"></script>
<!-- compile and build a local bundle -->
<script src="yourLocalPath/can-draw.min.js"></script>
<script>
var canDraw = new CanDraw({
container: document.getElementById('container'),
width: 400,
height: 400
});
// ...
</script>
Use with npm
npm i can-draw --save
// es module
import CanDraw from 'can-draw';
// commonjs
var CanDraw = require('can-draw');
<div id="container"></div>
// init `can-draw` area
var canDraw = new CanDraw({
container: document.getElementById('container'),
// if width/height is not given, CanDraw will
// get the width/height of container by default
width: 100,
height: 100
});
// create a shape instance, you can add different shapes to it
var shape = new CanDraw.Shape();
// a dashed circle
const circle = new CanDraw.Circle({
x: 0,
y: 0,
angle: 360,
radius: 10,
strokeWidth: 2,
stroke: '#0A6AEF',
dash: [1, 2],
});
// clear `can-draw` area
canDraw.clear();
// add circle to shape instance
shape.add(circle);
// add shape instance to canDraw instance
// and draw circle
canDraw.add(shape);
FAQs
Draw canvas conveniently.
The npm package can-draw receives a total of 2 weekly downloads. As such, can-draw popularity was classified as not popular.
We found that can-draw demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.