
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@solid-primitives/signal-builders
Advanced tools
A collection of chainable and composable reactive signal calculations, aka Signal Builders.
A collection of chainable and composable reactive signal calculations, AKA Signal Builders.
npm install @solid-primitives/signal-builders
# or
yarn add @solid-primitives/signal-builders
Signal builders create computations when used, so they need to be used under a reactive root.
Note, since all of the signal builders use createMemo
to wrap the calculation, updates will be caused only when the calculated value changes. Also the calculations should stay 'pure' – try to not cause side effects inside them.
import { push, flatten, remove } from "@solid-primitives/signal-builders";
const [fruits, setFruits] = createSignal(["apples", "bananas", "oranges", "tomatoes"]);
const [toRemove, setToRemove] = createSignal("tomatoes");
const list = flatten(remove(push(fruits, ["kiwis", "avocados"]), toRemove));
list(); // ["apples", "bananas", "oranges", "kiwis", "avocados"]
import { update, merge } from "@solid-primitives/signal-builders";
const [user, setUser] = createSignal({ name: { first: "John", last: "Doe" } });
const [last, setLast] = createSignal("Solid");
const modifiedUser = merge(update(user, "name", "last", last), { age: 21 });
modifiedUser(); // { name: { first: "John", last: "Solid" }, age: 21 }
import { add, multiply, clamp, int } from "@solid-primitives/signal-builders";
const [input, setInput] = createSignal("123");
const [ing, setIng] = createSignal(-45);
const [max, setMax] = createSignal(1000);
const value = clamp(multiply(int(input), add(ing, 54, 9)), 0, max);
import { lowercase, substring, template, add } from "@solid-primitives/signal-builders";
const [greeting, setGreeting] = createSignal("Hello");
const [target, setTarget] = createSignal("World");
const message = template`${greeting}, ${target}!`;
message(); // => Hello, World!
const solidMessage = lowercase(add(substring(message, 0, 7), "Solid"));
solidMessage(); // => hello, solid
push
- basically Array.prototype.push()
drop
- drop n items from the array startdropRight
- drop n items from the end of the arrayfilter
- basically Array.prototype.filter()
filterOut
- filter out passed item from an arrayremove
- removes passed item from an array (first one from the start)removeItems
- removes multiple items from an arraysplice
- signal-builder Array.prototype.splice()
slice
- signal-builder Array.prototype.slice()
map
- signal-builder Array.prototype.map()
sort
- signal-builder Array.prototype.sort()
concat
- Append multiple arrays togetherflatten
- Flattens a nested array into a one-level arrayfilterInstance
- filter list: only leave items that are instances of specified ClassesfilterOutInstance
- filter list: remove items that are instances of specified Classesget
- Get a single property value of an object by specifying a path to it.update
- Change single value in an object by key, or series of recursing keys.omit
- get an object copy without the provided keyspick
- get an object copy with only the provided keysmerge
- Merges multiple objects into a single one.string
- turns passed value to a stringfloat
- turns passed string to an float numberint
- turns passed string to an intigerjoin
- join array with a separator to a stringadd
- a + b + c + ...
substract
- a - b - c - ...
multiply
- a * b * c * ...
divide
- a / b / c / ...
power
- a ** b ** c ** ...
clamp
- clamp a number value between two other valuesround
- Math.round()
ceil
- Math.ceil()
floor
- Math.floor()
add
- a + b + c + ...
lowercase
- signal builder String.prototype.toLowerCase()
uppercase
- signal builder String.prototype.toUpperCase()
capitalize
- capitalize a string input e.g. "solidJS"
-> "Solidjs"
substring
- signal builder String.prototype.substring()
template
- Create reactive string templatessignal-builders
package is now a proof of concept of a fresh and experimental idea. Therefore all feedback/ideas/issues are highly welcome! :)
See CHANGELOG.md
FAQs
A collection of chainable and composable reactive signal calculations, aka Signal Builders.
The npm package @solid-primitives/signal-builders receives a total of 39 weekly downloads. As such, @solid-primitives/signal-builders popularity was classified as not popular.
We found that @solid-primitives/signal-builders demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.