
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Create beautiful images of your source code thanks to Carbon API. Typescript and Javascript support.
Create beautiful images of your source code thanks to Carbon API. Typescript and Javascript support.
Name | Type | Default | Description |
---|---|---|---|
lang | string | auto | Language to use for syntax highlighting. |
theme | string | dracula | Theme to use for the code. |
font | string | Hack | Font to use for the code. |
windowControls | boolean | true | Whether to show window buttons on top of the window |
widthAdjustment | boolean | true | Whether to adjust the width of the code to its content |
lineNumbers | boolean | true | Whether to show line numbers on the left of the code |
firstLineNumber | number | 1 | The number to start counting lines from |
watermark | boolean | false | Whether to show the Carbon watermark on the bottom right of the image |
fontSize | number | 18 | The font size to use for the code |
lineHeight | number | 169 | The line height to use for the code |
exportSize | number | 2 | The pixel density to export the image at |
import { Carbon } from 'carbon-now';
const carbon = new Carbon({
lang: 'javascript',
});
async () => {
const code = `console.log('Hello world!');`;
const imagePath = await carbon.generate(code, 'image.png');
// imagePath = /path/to/image.png
};
FAQs
Create beautiful images of your source code thanks to Carbon API. Typescript and Javascript support.
We found that carbon-now 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 News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.