Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
proto-list
Advanced tools
A utility for managing a prototype chain
Weekly downloads
Package description
The proto-list package is a simple data structure that manages a list of objects, each of which inherits from the one before it. This is useful for managing a chain of configurations or settings where each level of the list can override properties from the previous one.
Create and manage a prototypal list
This feature allows you to create a new prototypal list and manage it by pushing objects onto the list. Each object in the list inherits properties from the previous one.
{"var ProtoList = require('proto-list');\nvar list = new ProtoList();\nlist.push({a: 1});\nlist.push({b: 2});\nconsole.log(list.length); // 2\nconsole.log(list.a); // 1\nconsole.log(list.b); // 2"}
Access inherited properties
This feature demonstrates how properties in the list can be overridden by objects further down the list. The last object's properties take precedence.
{"var ProtoList = require('proto-list');\nvar list = new ProtoList();\nlist.push({a: 1});\nlist.push({b: 2});\nlist.push({a: 'overridden'});\nconsole.log(list.a); // 'overridden'\nconsole.log(list.b); // 2"}
The config-chain package is similar to proto-list in that it allows you to create a chain of configuration sources. It is more complex and feature-rich, offering additional functionality such as file loading, command-line argument integration, and environment variable support.
The rc package is another configuration management library that can be used to handle hierarchical configurations. It is similar to proto-list but also includes support for configuration files, environment variables, command-line arguments, and custom defaults.
Readme
A list of objects, bound by their prototype chain.
Used in npm's config stuff.
FAQs
A utility for managing a prototype chain
The npm package proto-list receives a total of 6,310,058 weekly downloads. As such, proto-list popularity was classified as popular.
We found that proto-list 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
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.