
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Create a responsive SVG that resizes to the container.
var base = require("d3-base");
var b = base("#container", {
height: 400
});
var b = base("#container", {
aspect: 0.5
});
You must pass base
a selector representing the parent element in width the SVG will be created. You can optionally pass an object as a second argument representing options. These are:
property | description |
---|---|
width | The initial width of the SVG. Defaults to width of parent |
height | The initial height of the SVG. Defaults to the aspect ratio. |
aspect | The aspect ratio of the SVG. Defaults to 0.618, approximately the golden ratio |
resize | Info about how the SVG should scale. Current options are:
|
onResize | callback function to fire whenever the SVG resizes. This function will receive three arguments: the (new) width, height, and scale, which is (current width) / (original width) |
var base = require("d3-base");
var b = base("#container", {
onResize: function(w, h, s) {
console.log("Scale is " + s);
}
});
FAQs
Responsive SVGs using D3.
The npm package d3-base receives a total of 3 weekly downloads. As such, d3-base popularity was classified as not popular.
We found that d3-base 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.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.