
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

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.