
Research
/Security News
Popular Tinycolor npm Package Compromised in Supply Chain Attack Affecting 40+ Packages
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Addition-only asynchronous state based on static data stitching
import { make } from 'cagibi';
// Create a stitchable copy of your object
const profile = make({ name: 'Joe', posts: [] });
// Use your object as a reference to stitch a sub-object
const post = make({ title: 'A new post' }, profile.posts);
// Stitch them all to get the final object
const stitched = stitch(profile, post);
// => { name: 'Joe', posts: [{ title: 'A new post' }] }
npm i cagibi
/ yarn add cagibi
Cagibi's name comes from the french word used to call a small storeroom. Pronounced /kä'jēbē/
.
cagibi
?make
and stitch
.write
and read
.protect(target, ...keys)
to forbid changes on keys.cagibi
come in handy?Merging nested data structure through async channels (API, parallel threads or job queues) without willing to maintain a key-value store with primary keys linking records.
import { make } from 'cagibi';
const profile = make({ name: 'Joe', posts: [] });
// => { name: 'Joe', posts: [] }
const post = make({ title: 'A new post' }, profile.posts);
import { stitch } from 'cagibi';
const stitched = stitch(profile, post);
Returns stitched state:
{
"name": "Joe",
"posts": [{ "title": "A new post" }]
}
import { make, stitch, write, read } from 'cagibi';
const stack = [];
const profile = make({ name: 'Joe', posts: [] });
const post = make({ title: 'A new post' }, profile.posts);
stack.push(write(profile));
stack.push(write(post));
// ...
// And only later on or in another environment
const profile = read(profileWritten);
const post = read(postWritten);
const stitched = stitch(profile, post);
Returns stitched state:
{
"name": "Joe",
"posts": [{ "title": "A new post" }]
}
import { make, stitch, write, read, Patches } from 'cagibi';
const patches = new Patches();
const profile = make({ name: 'Joe', posts: [] });
const post = make({ title: 'A new post' }, profile.posts);
patches.push(profile, post);
const savedPatches = patches.write();
// ...
// And only later on or in another environment
const importedPatches = new Patches();
importedPatches.read(savedPatches);
const stitched = importedPatches.stitch();
Returns stitched state:
{
"name": "Joe",
"posts": [{ "title": "A new post" }]
}
FAQs
Tiny asynchronous state management based on static data stitching
The npm package cagibi receives a total of 2 weekly downloads. As such, cagibi popularity was classified as not popular.
We found that cagibi 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.
Research
/Security News
Malicious update to @ctrl/tinycolor on npm is part of a supply-chain attack hitting 40+ packages across maintainers
Security News
pnpm's new minimumReleaseAge setting delays package updates to prevent supply chain attacks, with other tools like Taze and NCU following suit.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.