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

bem-promised-models

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bem-promised-models - npm Package Compare versions

Comparing version 0.0.20 to 0.0.21

23

blocks/promised-models/__model/promised-models__model.js

@@ -897,3 +897,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

remove: function () {
throw new Error('.find() is not implemented');
throw new Error('.remove() is not implemented');
}

@@ -1002,2 +1002,3 @@ });

__constructor: function () {
this.LISTEN_BRANCH = 'LISTEN_BRANCH';
this.__base.apply(this, arguments);

@@ -1082,10 +1083,28 @@ this._initModel();

_onModelChange: function () {
this._emitChange();
this._emitChange(true);
},
/**
* @override
* @param {Boolean} [fromNestedModel=true] do not init listeners
*/
_emitChange: function (fromNestedModel) {
if (!fromNestedModel) {
//model changed we need to subscribe again
this._initModel();
}
this.__base();
},
/**
* bind to model events
*/
_initModel: function () {
var prevValue = this._cachBranches[this.LISTEN_BRANCH];
if (prevValue) {
//unsubscribing
prevValue.un('calculate', this._onModelChange, this);
}
this.value.on('calculate', this._onModelChange, this);
this.commit(this.LISTEN_BRANCH);
}

@@ -1092,0 +1111,0 @@

4

package.json
{
"description": "BEM wrapper for promised-models",
"name": "bem-promised-models",
"version": "0.0.20",
"version": "0.0.21",
"repository": "git@github.com:delfrrr/bem-promised-models.git",

@@ -31,3 +31,3 @@ "keywords": [

"dependencies": {
"promised-models": "0.0.18"
"promised-models": "0.0.19"
},

@@ -34,0 +34,0 @@ "devDependencies": {

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