Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
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.
The npm package good-typescript receives a total of 0 weekly downloads. As such, good-typescript popularity was classified as not popular.
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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.