
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Downloads – Documentation – API – Integrating – Performance
....
Tested to work against Internet Explorer 6+, Safari 3+, Google Chrome 1+, Firefox 3+, and Opera 10+!
Development Version (1.0.0) — 6.5 KiB, uncompressed with comments.
Production Version (1.0.0) — 715 bytes, minified and gzipped.
...
Creates a new class. Self() is shorthand for Self.extend().
Shorthand for Self.extend(Self.create(prototype), definition).
Wraps a prototypal constructor as a Self class, returning the created class.
Property indicating the version of Self.
Calling returns an instance of the class, passing any arguments to the
constructor method.
Extends the class with a new class definition, returning the created class.
Sugar method for defining static properties on a class.
Copies another class's definitions into the current class.
Parent class
The class that created this instance.
The parent class of this instance, same as inst.__class__.__super__.
A prototype can be manually wrapped with Self.create.
var EventEmitter = Self.create(require('events').EventEmitter);
Or use the shorthand and pass your base prototype as the first parameter in your class definition.
var Foobar = Self(EventEmitter, {
constructor: function (self) {
Foobar.__super__.constructor.call(self); // Calls EventEmitter's constructor
}
});
Backbone's initialize function is not the constructor. It's a
call super method, which gets called
by the real constructor. So as long as you keep the constructor semantics the
same, you'll be fine!
var MyModel = Self(Backbone.Model, {
initialize: function (self, attr, opts) {
MyModel.__super__.initialize.call(self, attr, opts);
}
});
I recommend extending the Backbone library into your own namespace, so you don't have to call Self on the library everytime. It also provides a place for you to roll your own base class logic.
var mvc = _.reduce(Backbone, function (obj, value, key) {
obj[key] = (value.prototype && _.keys(value.prototype).length) ? Self.create(value) : value;
return obj;
}, {});
mvc.Collection = mvc.Collection.extend({
});
Since Self.js wraps every method with a function that unshifts the context onto
your method's arguments, there is overhead. You will have to weigh the
performance impact vs the convenience of an explicit self variable.
For me, an empty Self method is 2 orders of magnitude slower than an empty prototypal method. Keep in mind this overhead may be negligible compared to the time it takes to run the code in your method. Below are the actual timings of calling those methods on my machine.
To run these benchmarks yourself, clone this project and run:
npm install -d && node ./benchmarks.js
It should be possible to macro Self methods in-place (only in Node.js), thus removing the overhead of wrapping every method. If anyone is interested in this, please let me know and we can investigate it!
FAQs
Multi pipe promises!
The npm package pachinko receives a total of 1 weekly downloads. As such, pachinko popularity was classified as not popular.
We found that pachinko 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.