Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
quantagraph
Advanced tools
A Quantagraph is a data structure for storing and evaluating relationships between values and functions.
This package is still in Alpha. All future versions are subject to breaking changes until the official first version, at which point the full documentation will be released and Semantic Versioning will be used.
A Quantagraph is a data structure for storing and evaluating relationships between values and functions. It can be used to represent some mathematical equations, dependency graphs, and other types of logical relationships. It is a type of Directed Acyclic Graph designed for computation-heavy use cases.
A common use case for this type of data structure is a spreadsheet, where values and functions are stored and need to be recomputed when changes occur.
npm install quantagraph --save
With CommonJS:
const Quantagraph = require('quantagraph');
With ES Modules:
import Quantagraph from 'quantagraph';
Storing and calculating the Pythagorean Theorem:
// Formula
const pythagorean = [
{ id: 'a' }, // Stored Property
{ id: 'b' }, // Stored Property
{ // Computed Property
id: 'c',
inputs: ['a', 'b'],
value: (a, b) => Math.sqrt((a ** 2) + (b ** 2)),
},
];
const { quantagraph, nodeIdMap } = Quantagraph.create({
nodes: pythagorean,
});
// Stored Values
const storedPropertyValues = {
[nodeIdMap.a]: 3,
[nodeIdMap.b]: 4,
};
const values = Quantagraph.evaluate({
quantagraph,
values: storedPropertyValues,
});
// values[nodeIdMap.a] => 3
// values[nodeIdMap.b] => 4
// values[nodeIdMap.c] => 5
If you would like to contribute to this repo:
git checkout -b my-new-feature
git add .
git commit -am 'Add some feature'
git push origin my-new-feature
All contributions welcomed!
We use SemVer for versioning.
MIT License © Chandler Freeman
FAQs
A Quantagraph is a data structure for storing and evaluating relationships between values and functions.
The npm package quantagraph receives a total of 1 weekly downloads. As such, quantagraph popularity was classified as not popular.
We found that quantagraph 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.