Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Sometimes you want to keep track of a collection of objects, but have that collection indexed by different properties. This is where indexify might be useful:
indexify = require('indexify');
var persons = indexify([
{ key: 'id', extract: function(obj) { return obj.id; }, unique: true },
{ key: 'age', extract: function(obj) { return obj.age; }, unique: false }
]);
persons.add({
id: '09707', age: 37
});
persons.add({
id: '08227', age: 37
});
persons.by.age(37); // two persons (an array)
persons.by.id('09707'); // one person (an object)
That's basically it. The only other thing you're currently able to do is remove objects from the collection:
persons.remove({
id: '09707', age: 37
});
extract
function returns an array, then the index will be updated based on the individual
elements in the array.FAQs
A simple collection that will automatically update multiple indexes.
We found that indexify 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.