
Research
/Security News
npm Author Qix Compromised in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@bjornstar/tomes
Advanced tools
Evented Storage Agnostic Data API
Problem: You've got data and you want to do something whenever it changes.
Access and modify your data through the Tomes API and you'll get change events.
Play with a live demo here - https://bjornstar.github.io/tomes/
var filmData = {
cast: [
{ name: "Mr. Blonde", guns: 1, razors: 1 },
{ name: "Marvin Nash", ears: [ "left", "right" ], cop: true },
]
};
var reservoirDogs = Tome.conjure(filmData);
reservoirDogs.cast[1].on('readable', function (marvinNash) {
console.log(marvinNash.ears.length);
});
// >>> 2
reservoirDogs.cast[1].ears.pop();
// >>> 1
Returns a new Tome containing your data.
Returns data's type as a string. Tomes has types that exist in JSON which are:
Returns a boolean indicating whether data is a Tome or not.
Returns a regular JavaScript version of your Tome.
Make a tome and all of it's sub-tomes emit destroy. This will not delete anything.
Assign data to a Tome.
Assign data to key on a Tome. Set will create a Tome on the key if it does not exist.
Delete a key from a Tome.
Swap key with tome.
Rename key to newkey.
Move key to tome. Optionally call it newkey on that tome.
Get a single change operation from the root Tome, removing it in the process. Returns null if there are no changes.
Get all change operations from the Tome
Applies a change operation or an array of change operations to a Tome.
Makes the tome and all of it's sub-tomes emit destroy. Does not delete anything.
Returns a regular javascript version of your Tome.
Returns a Tome's key.
Returns a Tome's parent Tome.
Returns a Tome's version.
Returns a boolean value indicating whether or not the Tome is observably indistinguishable from value (ref). If no value is given, returns whether or not the Tome's value is truthy.
Returns whether a Tome has been changed, but the change has not been read.
Emitted when a Tome receives a new key.
Emitted when a key is deleted from a Tome.
Emitted when a Tome is deleted. Removes all event listeners for this Tome.
Emitted every time a Tome or any of its child Tomes are altered. If the Tome was a primitive (ie. string, number, or boolean) the previous value will be emitted as well, but only if it did not change types.
Emitted by the root tome when a Tome changes type.
v1.1.2 / 2021-02-24
FAQs
Evented Storage Agnostic Data API
We found that @bjornstar/tomes 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
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
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.