Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
A library for defining an abstract interface around datasets (alternatively: a well-intentioned attempt to simplify d3.chart).
This utility allows library authors to define an abstract "shape" for datasets. Library consumers may have datasets that conform to a different structure. They can use this data directly if they provide a "mapping" function.
// (library code: setup)
// Create a datamap with the abstract attribute names:
// ...
this.dm = new DataMap(['time', 'space']);
// ...
// (consumer code: configuration)
// Define a mapping that translates the abstract attribute names to the names
// that fit your data:
Library.dm.map({
time: function() { return this.tiempo; },
space: function() { return this.espacio; }
});
// (consumer code: data specification)
// Supply your dataset to the library
Library.draw([ { tiempo: 23, espacio: 45 } ]);
// (library code: dereferencing)
// Wrap incoming data to normalize its "shape":
draw: function(userData) {
var normalized = this.dm.wrap(userData);
normalized.time; // => 23
normalized.space; // => 45
}
Copyright (c) 2013 Mike Pennisi
Licensed under the MIT license.
FAQs
Define abstract interfaces around datasets
The npm package datamap receives a total of 1 weekly downloads. As such, datamap popularity was classified as not popular.
We found that datamap 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.