
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@aminya/mixto
Advanced tools
A mixin superclass. Its subclasses have `.extend` and `.includeInto` methods to mix behavior into other objects and classes.

npm install @aminya/mixto
To create a mixin, subclass mixto:
const Mixin = require('mixto/lib/es6')
class MyMixin extends Mixin {
static classMethod() { console.log("foo"); }
instanceMethod() { console.log("bar"); }
}
Then mix into classes with .includeInto:
class MyClass {
static initClass() {
MyMixin.includeInto(this); // adds all the mixin's class properties or prototype properties to the target class if they aren't already defined
}
}
MyClass.initClass();
MyClass.classMethod();
(new MyClass).instanceMethod();
Or extend individual objects with .extend:
const myObject = {a: 1, b: 2};
MyMixin.extend(myObject); // adds all the mixin's prototype properties to the target object if they aren't already defined
myObject.instanceMethod();
Or build standalone instances of your 'mixin':
const standalone = new MyMixin;
standalone.instanceMethod();
To create a mixin, subclass mixto:
Mixin = require 'mixto'
class MyMixin extends Mixin
@classMethod: -> console.log("foo")
instanceMethod: -> console.log("bar")
Then mix into classes with .includeInto:
class MyClass
MyMixin.includeInto(this)
MyClass.classMethod()
(new MyClass).instanceMethod()
Or extend individual objects with .extend:
myObject = {a: 1, b: 2}
MyMixin.extend(myObject)
myObject.instanceMethod()
Or build standalone instances of your 'mixin':
standalone = new MyMixin
standalone.instanceMethod()
FAQs
A mixin superclass. Its subclasses have `.extend` and `.includeInto` methods to mix behavior into other objects and classes.
We found that @aminya/mixto 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.