Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Dynamic text rendering for interactive command line apps.
npm install apochromat --save
import {Lens} from 'apochromat';
const greeting = new Lens();
const salutation = new Lens();
const subject = new Lens();
greeting.subscribe((event) => {
if (event === 'render') {
console.log(greeting.frame);
}
});
salutation.render`Hi`;
subject.render`everyone`;
greeting.render`${salutation}, ${subject}!`;
subject.render`world`;
salutation.render`Hello`;
Hi, everyone!
Hi, world!
Hello, world!
import {Lens, list} from 'apochromat';
const foobarbaz = new Lens();
const foo = new Lens();
const bar = new Lens();
const baz = new Lens();
foo.render`foo`;
bar.render`bar`;
baz.render`baz`;
foobarbaz.render(...list(',', foo, bar, baz));
console.log(foobarbaz.frame);
foo,bar,baz
type LensListener = (event: LensEvent) => void;
type LensEvent = 'attach' | 'detach' | 'render';
class Lens {
get frame(): string;
render(segments: readonly string[], ...children: readonly unknown[]): boolean;
subscribe(listener: LensListener): () => void;
}
function list(
delimiter: string,
...elements: readonly unknown[]
): [readonly string[], ...(readonly unknown[])];
Copyright 2021 Clemens Akens. All rights reserved. MIT license.
FAQs
Dynamic text rendering for interactive command line apps.
We found that apochromat 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.