1.0.0 • Published 4 years ago
@amylas-std/api v1.0.0
Amylas Std library
Constant
import {AmylasContext} from "@amylas/core"
import AmylasStdLib from "@amylas/lib.std.api"
const context = new AmylasContext();
const {constant} = new AmylasStdLib(context);
// A constant is added to the context
const myConstant = constant(42);
Variable
import {AmylasContext} from "@amylas/core"
import AmylasStdLib from "@amylas/lib.std.api"
const context = new AmylasContext();
const {variable} = new AmylasStdLib(context);
// A variable is added to the context
const myVariable = variable();
Pipe
import {AmylasContext} from "@amylas/core"
import AmylasStdLib from "@amylas/lib.std.api"
const context = new AmylasContext();
const {constant, variable, pipe} = new AmylasStdLib(context);
const myConstant = constant(42);
const myVariable = variable();
// the pipeVariable is equal to the myVariable value
const pipeVariable = pipe(myVariable);
// the pipeArray is equals to an array containing the myConstant & myVariable values
const pipeArray = pipe([myConstant, myVariable]);
1.0.0
4 years ago