
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
A mapped list like arrays are in PHP. Supporting only string keys and values at the moment.
A small and fast library for creating mapped lists like arrays in PHP.
This class was created because I am very used to working with arrays in PHP, and really missed the same structure in JavaScript/TypeScript.
This library only supports string as datatype for keys and values at the moment.
// Create a new list and populate it with some data
var list = new MappedList();
list.add("il", "Israel");
list.add("no", "Norway");
list.add("es", "Spain");
list.add("en", "England");
// Iterate list of IDs, check if each ID is a key in the
// list, and get the object in that case
var ids = ["il", "no", "se"];
ids.forEach(function(id) {
if (list.has(id)) {
var value = list.get(id);
console.log("ID "+id+" has value '"+value+"'");
}
else {
console.log("ID "+id+" does not exist in list");
}
});
// Delete an element
list.delete("es");
// Get the number of elements in the list
console.log(list.length()); // outputs 3
console.log(list.getKey("Norway")); // Outputs "no"
##Build If you need to include this library on you webpage, you can build the javascript version by running the command "npm run build".
FAQs
A mapped list like arrays are in PHP. Supporting only string keys and values at the moment.
We found that mappedlist 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.