angular-immutable
Advanced tools
Comparing version 0.0.3 to 0.1.0
{ | ||
"name": "angular-immutable", | ||
"version": "0.0.3", | ||
"version": "0.0.1", | ||
"main": "./dist/immutable.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/mgechev/angular-immutable", |
(function () { | ||
"use strict"; | ||
var immutableFilter = (function() { | ||
return (function(val) { | ||
if (val instanceof Immutable.Collection) { | ||
return val.toJS(); | ||
var immutableDirective = (function() { | ||
var priority = 2000; | ||
var scope = true; | ||
var link = (function(scope, el, attrs) { | ||
var immutable = attrs.immutable; | ||
if (!(/^[a-zA-Z0-9_$]+$/).test(immutable)) { | ||
return ; | ||
} | ||
return val; | ||
if (!scope[immutable]) { | ||
console.warn(("No " + immutable + " property found.")); | ||
} | ||
scope.$watch((function() { | ||
return scope.$parent[immutable]; | ||
}), (function(val) { | ||
scope[immutable] = val.toJS(); | ||
})); | ||
}); | ||
return { | ||
priority: priority, | ||
scope: scope, | ||
link: link | ||
}; | ||
}); | ||
angular.module('immutable', []).filter('immutable', immutableFilter); | ||
angular.module('immutable', []).directive('immutable', immutableDirective); | ||
}()); |
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";var t=function(){return function(t){return t instanceof Immutable.Collection?t.toJS():t}};angular.module("immutable",[]).filter("immutable",t)}(); | ||
!function(){"use strict";var t=function(){var t=2e3,n=!0,r=function(t,n,r){var e=r.immutable;/^[a-zA-Z0-9_$]+$/.test(e)&&(t[e]||console.warn("No "+e+" property found."),t.$watch(function(){return t.$parent[e]},function(n){t[e]=n.toJS()}))};return{priority:t,scope:n,link:r}};angular.module("immutable",[]).directive("immutable",t)}(); |
@@ -1,13 +0,24 @@ | ||
/* global angular, Immutable */ | ||
/* global angular */ | ||
var immutableFilter = () => { | ||
return (val) => { | ||
if (val instanceof Immutable.Collection) { | ||
return val.toJS(); | ||
var immutableDirective = () => { | ||
let priority = 2000; | ||
let scope = true; | ||
let link = (scope, el, attrs) => { | ||
let { immutable } = attrs; | ||
if (!(/^[a-zA-Z0-9_$]+$/).test(immutable)) { | ||
return; | ||
} | ||
return val; | ||
if (!scope[immutable]) { | ||
console.warn(`No ${immutable} property found.`); | ||
} | ||
scope.$watch(() => { | ||
return scope.$parent[immutable]; | ||
}, (val) => { | ||
scope[immutable] = val.toJS(); | ||
}); | ||
}; | ||
return { priority, scope, link }; | ||
}; | ||
angular.module('immutable', []) | ||
.filter('immutable', immutableFilter); | ||
.directive('immutable', immutableDirective); |
{ | ||
"name": "angular-immutable", | ||
"repository": "git@github.com:mgechev/angular-immutable.git", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "Immutable data structures in AngularJS", | ||
@@ -12,5 +11,2 @@ "main": "./dist/immutable.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"angular": ">=1.1.1" | ||
}, | ||
"devDependencies": { | ||
@@ -17,0 +13,0 @@ "gulp": "^3.8.11", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
1798821
0
35
31599
44
1
4
3
- Removedangular@>=1.1.1
- Removedangular@1.8.3(transitive)