
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
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
The npm package dotmix receives a total of 1 weekly downloads. As such, dotmix popularity was classified as not popular.
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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.