Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
good-typescript
Advanced tools
Some good and useful implementations for TypeScript or JavaScript projects.
Some good and useful implementations for TypeScript or JavaScript projects.
Directly from the master branch dist folder: https://github.com/SergioMorchon/Good-Typescript/tree/master/dist
Here are some examples of the main patterns here.
var async = new Good.Patterns.Future.Async<number, string, string>();
async.await().done((result: number) => {
console.log(`done: ${result}`);
}).progress((value: string) => {
console.log(`progress: ${value}`);
}).fail((error: string) => {
console.log(`error: ${error}`);
}).always(() => {
console.log("always");
});
async.notify("1");// "progress: 1"
async.notify("3");// "progress: 3"
async.notify("duck!");// "progress: duck!"
async.resolve(4);// "done: 4"
// "always"
var task: Good.Patterns.Parallel.Task<string, void, string>,
p1 = "task", p2 = "must", p3 = ["w", "o", "r", "k"];
task = new Good.Patterns.Parallel.Task<string, void, string>((async: Good.Patterns.Future.Async<string, void, string>, r1: string, r2: string, r3: string[]) => {
async.resolve([r1, r2, r3.join("")].join(" "));
});
task.run(p1, p2, p3).done((result: string) => {
console.log(result);// "task must work"
});
Good.Patterns.Contract.requires(true);// ok
Good.Patterns.Contract.requires(false, "contract violation");// throws a PreConditionError
Good.Patterns.Contract.ensures(true);// ok
Good.Patterns.Contract.ensures(false, "contract violation");// throws a PostConditionError
var myModule: any = {},
path: Object;
path = Good.Patterns.Namespace.extend(myModule, "with.a.namespace");
typeof myModule.with.a.namespace !== "undefined";// true
var data = {
add: function (s1: number, s2: number) {
return s1 + s2;
}
}, command = new Good.Patterns.Command.Invoker(data);
console.log(command.execute("add", 4, 6));// 10
command.execute("notExists");// throws an InvocationError
var group = new Good.Patterns.Mediator.Group(),
error = "Some core error";
group.subscribe("core-error",(value: any) => {
console.log(value);
});
group.publish("core-error", error);// "error"
FAQs
Some good and useful implementations for TypeScript or JavaScript projects.
We found that good-typescript 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.