
Security News
152 Chrome Live Wallpaper Extensions Hid Ad Tracking and Faked Google Search Traffic
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.
callable-class
Advanced tools
An extendable base class for callable classes, designed to work nicely with Flow.
// @flow
declare class Callable<A, B> extends Function {
// See https://github.com/facebook/flow/issues/3084
// (A): B
$call: A => B;
constructor(A => B): this;
}
Callable with custom methods// @flow
import Callable from "callable-class";
class Composable<A, B> extends Callable<A, B> {
andThen(next: B => C): Composable<A, B> {
return new Composable(x => next(this(x)));
}
}
const foo = new Composable(x => [...x, 1])
.andThen(x => [...x, 2])
.andThen(x => [...x, 3]);
console.log(foo([])); // [1, 2, 3]
Callable with custom fields and constructor// @flow
import Callable from "callable-class";
class ActionCreator<Type, A, B> extends Callable<A, B> {
type: string;
constructor(type: Type, fn: A => B) {
super(fn);
this.type = type;
}
}
const foo = new ActionCreator("foo", x => x + 1);
console.log(foo.type); // "foo"
console.log(foo(0)); // 1
FAQs
An extendable callable class
The npm package callable-class receives a total of 13 weekly downloads. As such, callable-class popularity was classified as not popular.
We found that callable-class 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
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.