![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@nodl/core
Advanced tools
The core implementation of the Nodl framework.
# Using NPM
npm install @nodl/core
# Using Yarn
yarn add @nodl/core
# Using Bun
bun install @nodl/core
Nodes are units that consists of inputs and outputs. They're conceptually very similar to functions, with the difference that outputs may be multiple, compared to a function's single return value.
An Addition Node may for instance have two inputs and a single output, which computes the sum of the inputs.
import { z } from 'zod';
import { Node, Input, Output } from '@nodl/core';
import { combineLatest, map } from 'rxjs';
/** Declare a zod schema for value validation */
const NumberSchema = z.number();
class Addition extends Node {
inputs = {
a: new Input({ name: 'A', type: NumberSchema, defaultValue: 0 }),
b: new Input({ name: 'B', type: NumberSchema, defaultValue: 0 })
};
outputs = {
output: new Output({
name: 'Output',
type: NumberSchema,
observable: combineLatest([this.inputs.a, this.inputs.b]).pipe(
map(inputs => inputs.reduce((sum, value) => sum + value), 0)
)
})
};
}
import { z } from 'zod';
import { Node, Input, Output } from '@nodl/core';
import { combineLatest, map } from 'rxjs';
/** Declare a zod schema for value validation */
const NumberSchema = z.number();
class Addition extends Node {
inputs = {
a: new Input({ name: 'A', type: NumberSchema, defaultValue: 0 }),
b: new Input({ name: 'B', type: NumberSchema, defaultValue: 0 })
};
outputs = {
output: new Output({
name: 'Output',
type: NumberSchema,
observable: combineLatest([this.inputs.a, this.inputs.b]).pipe(
map(inputs => inputs.reduce((sum, value) => sum + value), 0)
)
})
};
}
/** Declare 3 addition nodes */
const additionNode1 = new Addition();
const additionNode2 = new Addition();
const additionNode3 = new Addition();
/** Connect them together */
additionNode1.outputs.output.connect(additionNode3.inputs.a);
additionNode2.outputs.output.connect(additionNode3.inputs.b);
/**
* The output of AdditionNode3 will fire with a new sum
* everytime the inputs of AdditionNode1 and AdditionNode2 changes
*/
additionNode3.outputs.output.subscribe(console.log);
FAQs
Core implementation of the Nodl framework
The npm package @nodl/core receives a total of 26 weekly downloads. As such, @nodl/core popularity was classified as not popular.
We found that @nodl/core 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.