Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
This is a really simple shim for working with OLOO (Objects Linked to Other Objects) a Kyle Simpson's JS pattern for handling objects relations by delagating behaviors between objects. I've just created this shim because i think it helps dealing with some
This is a really simple shim for working with OLOO (Objects Linked to Other Objects) a Kyle Simpson's JS pattern for handling objects relations by delegating behaviors between objects.
I've created this shim because i think it helps dealing with some problems about the JS language it self, not the pattern. This package provides access to the parent object, something that is not natively available and this way you can extend methods by accessing the parent method, at the same it also grants more readability of the code.
For a complete explanation of OLOO pattern you should really go here.
This is a very usefull pattern and i really advise you to take a look. Also try this shim, is this way i like to work with OLOO and maybe you will too.
npm install oloo-shim --save
require("oloo-shim").install();
var o1 = {
firstname: null,
init: function(firstname){
this.setFirstname(firstname);
},
setFirstname: function(name){
this.firstname = name;
}
};
var o2 = Object.oloo( o1, {
lastname: null,
init: function(firstname, lastname){
this.parent.init(firstname); // access parent function with same name
this.lastname = lastname;
},
setLastname: function(name){
this.lastname = name;
}
});
var o3 = Object.oloo(o2, {
getFullname: function(){
return this.firstname+" "+this.lastname;
}
});
var o4 = Object.oloo(o3);
o4.init("Daniel", "Meneses");
console.log( o4.getFullname() );
FAQs
This is a really simple shim for working with OLOO (Objects Linked to Other Objects) a Kyle Simpson's JS pattern for handling objects relations by delagating behaviors between objects. I've just created this shim because i think it helps dealing with some
We found that oloo-shim 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.