
Security News
NIST Officially Stops Enriching Most CVEs as Vulnerability Volume Skyrockets
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.
Simple mixin implementation.
1.0.1
npm install dotmix --save
Add a "mix" method to a source like this:
var Dotmix = require('dotmix');
var Blah = {
include : function (data) {
return {
blah : function (text) {
return (data.greeting + ' ' + text);
}
}
},
extend : {
barf : function (food) {
return ("NOW BARFING: " + food);
}
}
};
Dotmix(Blah);
module.exports = Blah;
Mixin sources should be objects with include and/or extend attributes. Their values can be either an object, or if you want to pass configuration data, functions accepting that single data argument and returning an object.
You mix into a target like this:
var Blah = require('./Blah');
function Barf (derp) {
this.derp = derp;
}
Blah.mix({
into : Barf,
data : {
greeting: 'wow...'
}
});
barf = new Barf();
barf.blah('barf!!'); // wow... barf!!
Barf.barf('pancakes'); // NOW BARFING: pancakes
It's also possible to use the Dotmix.mix method directly
var Dotmix = require('dotmix');
var Foo = {
include : {
foo : function () {
return 'food';
}
}
};
function Duh (derp) {
this.derp = derp;
}
Dotmix.mix({
from : Foo,
into : Duh
});
duh = new Duh();
duh.foo() // 'food'
Includes ideas from
FAQs
simple mixin implementation
We found that dotmix 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
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.