Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alamid-list

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alamid-list - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

11

lib/List.js

@@ -235,5 +235,7 @@ "use strict";

/**
* Calls the given function with the View as first argument and the given config (optionally). Plugins can be used
* Calls the given function with the List as first argument and the given config (optionally). Plugins can be used
* to hook into class methods by overriding them.
*
* You may call this function multiple times with the same plugin, the plugin will only be applied once.
*
* @param {Function} plugin

@@ -244,4 +246,9 @@ * @param {Object=} config

List.use = function (plugin, config) {
plugin(this, config);
this._plugins = this._plugins || [];
if (this._plugins.indexOf(plugin) === -1) {
plugin(this, config);
this._plugins.push(plugin);
}
return this;

@@ -248,0 +255,0 @@ };

2

package.json
{
"name": "alamid-list",
"version": "0.4.2",
"version": "0.4.3",
"description": "Simple observable arrays",

@@ -5,0 +5,0 @@ "main": "./lib/List.js",

@@ -49,2 +49,8 @@ "use strict";

it("should apply the same plugin only once", function () {
List.use(plugin, config);
List.use(plugin, config);
expect(plugin).to.have.been.calledOnce;
});
it("should be usable on other objects too", function () {

@@ -51,0 +57,0 @@ var otherObj = {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc