New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gedi

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gedi - npm Package Compare versions

Comparing version 0.9.5 to 0.9.6

95

gedi.js

@@ -48,5 +48,2 @@ //Copyright (C) 2012 Kory Nunn

// Whether model events are paused
eventsPaused = false,
// gel instance

@@ -67,8 +64,8 @@ gel,

if(!objectReferences){
objectReferences = [];
objectReferences = {};
modelReferences.set(object, objectReferences);
}
if(objectReferences.indexOf(path) < 0){
objectReferences.push(path);
if(!(path in objectReferences)){
objectReferences[path] = null;
}

@@ -99,5 +96,5 @@

objectReferences.splice(objectReferences.indexOf(path),1);
delete objectReferences[path];
if(!objectReferences.length){
if(!Object.keys(objectReferences).length){
modelReferences.del(object);

@@ -130,5 +127,5 @@ }

for(var i = objectReferences.length - 1; i >= 0; i--){
if(objectReferences[i] !== parentPath){
trigger(objectReferences[i]);
for(var path in objectReferences){
if(path !== parentPath){
trigger(path);
}

@@ -152,7 +149,7 @@ }

Array.prototype.indexOf = Array.prototype.indexOf || function (object) {
fastEach(this, function (value, index) {
if (value === object) {
return index;
for (var i = 0; i < this.length; i++) {
if (this === object){
return i;
}
});
}
};

@@ -170,3 +167,2 @@

//***********************************************

@@ -178,15 +174,2 @@ //

function fastEach(array, callback) {
for (var i = 0; i < array.length; i++) {
if (callback(array[i], i, array)) break;
}
return array;
}
//***********************************************
//
// Array Fast Each
//
//***********************************************
function each(object, callback) {

@@ -218,3 +201,3 @@ var isArray = Array.isArray(object);

return isDirty(paths.resolve(scope.get('_gediModelContext_'), (token instanceof PathToken) ? token.original : paths.create()));
return isDirty(paths.resolve(scope.get('_gmc_'), (token instanceof PathToken) ? token.original : paths.create()));
};

@@ -224,3 +207,3 @@

var token = args.raw()[0],
path = paths.resolve(scope.get('_gediModelContext_'), (token instanceof PathToken) && token.original),
path = paths.resolve(scope.get('_gmc_'), (token instanceof PathToken) && token.original),
source = get(path, model),

@@ -264,3 +247,3 @@ result,

var memoiseObject = memoiseCache[path.toString()];
var memoiseObject = memoiseCache[path];
if(memoiseObject && memoiseObject.model === model){

@@ -463,3 +446,4 @@ return memoiseObject.value;

fastEach(callbackBindingParts, function(pathPart, i){
for(var i = 0; i < callbackBindingParts.length; i++) {
var pathPart = callbackBindingParts[i];
if(pathPart === pathConstants.wildcard){

@@ -470,3 +454,4 @@ callbackBindingParts[i] = target[i];

}
});
}
if(wildcardMatchFail){

@@ -527,22 +512,2 @@ continue;

//
// Pause Model Events
//
//***********************************************
function pauseModelEvents() {
eventsPaused = true;
}
//***********************************************
//
// Resume Model Events
//
//***********************************************
function resumeModelEvents() {
eventsPaused = false;
}
//***********************************************
//
// Set Binding

@@ -568,3 +533,4 @@ //

fastEach(expressionPaths, function (path) {
for(var i = 0; i < expressionPaths.length; i++) {
var path = expressionPaths[i];
if(!boundExpressions[path]){

@@ -574,3 +540,4 @@ boundExpressions[path] = true;

}
});
}
return;

@@ -654,5 +621,5 @@ }

if(callback != null && callback.references){
fastEach(callback.references, function(path){
removeBinding(path, callback);
});
for(var i = 0; i < callback.references.length; i++) {
removeBinding(callback.references[i], callback);
}
}else{

@@ -666,5 +633,5 @@ internalBindings = [];

if(expressionPaths.length > 1){
fastEach(expressionPaths, function(path){
removeBinding(path, callback);
});
for(var i = 0; i < expressionPaths.length; i++) {
removeBinding(expressionPaths[i], callback);
}
return;

@@ -750,3 +717,3 @@ }

scope['_gediModelContext_'] = parentPath;
scope['_gmc_'] = parentPath;

@@ -772,3 +739,3 @@ return gel.evaluate(expression, scope, returnAsTokens);

scope = {
_gediModelContext_: parentPath
_gmc_: parentPath
};

@@ -775,0 +742,0 @@

@@ -9,3 +9,3 @@ {

],
"version": "0.9.5",
"version": "0.9.6",
"main": "gedi.js",

@@ -12,0 +12,0 @@ "dependencies": {

@@ -22,3 +22,3 @@ var Lang = require('lang-js'),

this.path = this.original;
this.result = get(paths.resolve(scope.get('_gediModelContext_'), this.original), model);
this.result = get(paths.resolve(scope.get('_gmc_'), this.original), model);
this.sourcePathInfo = {

@@ -25,0 +25,0 @@ path: this.original

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