Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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
The npm package oloo-shim receives a total of 0 weekly downloads. As such, oloo-shim popularity was classified as not popular.
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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.