
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@corefunc/decorators
Advanced tools
Decorators for modern JavaScript.
Please Note: This is "Work in Progress" package. The new functionality will be added very slowly.
ECMAScript Module.
import {
attempt, consoleGroup, measureExecution,
} from "@corefunc/decorators";
Deno (Pika https://pika.dev/)
import {
attempt, consoleGroup, measureExecution,
} from "https://cdn.pika.dev/@corefunc/decorators";
import { attempt } from "@corefunc/decorators";
class Kitty {
@attempt((error: Error, args: any[]) => {
console.warn("Exception thrown!");
console.log(error.message); // "uwu"
console.dir(args); // [ 10, false ]
})
meow(volume: number, cute = true) {
throw new Error("uwu");
}
}
new Kitty().meow(10, false);
import { consoleGroup } from "@corefunc/decorators";
class Class {
@consoleGroup("GROUP ASYNC")
async asyncRun() {
console.log("I'm async");
}
@consoleGroup("GROUP SYNC")
syncRun() {
console.log("I'm sync");
}
}
const test = new Class();
test.syncRun();
await test.asyncRun();
import { measureExecution } from "@corefunc/decorators";
class Class {
/* conole.time() label text */
@measureExecution("long execution time here")
hardTask() {
let result = 0;
for (let index = 0; index < 1_000_000_000; index++) {
result += index;
}
return result;
}
}
new Class().hardTask();
import { Instance } from "@corefunc/decorators";
class ClassAlpha {
name;
}
class ClassBeta {
@Instance(ClassAlpha)
alpha;
constructor(alpha) {
this.alpha = alpha;
}
}
const beta = new ClassBeta({ name: 'ALPHA' });
beta.alpha; // ClassAlpha
FAQs
Decorators for modern JavaScript
The npm package @corefunc/decorators receives a total of 0 weekly downloads. As such, @corefunc/decorators popularity was classified as not popular.
We found that @corefunc/decorators 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.