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

angular-property-binder

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-property-binder - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

{
"name": "angular-property-binder",
"name": "angular-property-binder-source",
"description": "Angular element binding service, keep safe your object references.",
"version": "0.1.5",
"version": "0.1.12",
"authors": [

@@ -30,4 +30,4 @@ "Nicolas Gaignoux <gaignoux.nicolas@gmail.com>"

"dependencies": {
"angular": "~1.3.6"
"angular": "~1.3.15"
}
}
// angular-property-binder
// version: 0.1.10
// version: 0.1.12
// author: Gaignoux Nicolas
// generated: Thu Mar 05 2015 02:05:48 GMT+0100 (Europe de l’Ouest)
// generated: Thu Apr 16 2015 19:20:53 GMT+0200 (Paris, Madrid (heure d’été))
// Autogenerated, do not edit. All changes will be undone.
!function(a,b,angular){"use strict";angular.module("PropertyBinder",[]);var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)};angular.module("PropertyBinder").provider("PropertyBinder.providers.binder",function(){this.$get=function(){var a=function(){function a(){var a=void 0===arguments[0]?[]:arguments[0];this._properties=a instanceof Array?a:[a],this._binded=!1,this._sealed=!1,this._to=void 0,this._from=void 0,this._path=[],this._aliases={},this._change=function(){}}return c(a,null,{from:{value:function(a){var b=void 0===arguments[1]?[]:arguments[1];return this._throwErrorIfAlreadyBinded(),this._path="string"==typeof b?b=b.split("."):b,this._from=a,this},writable:!0,enumerable:!0,configurable:!0},to:{value:function(a){return this._throwErrorIfAlreadyBinded(),this._to=a,this},writable:!0,enumerable:!0,configurable:!0},as:{value:function(){var a=void 0===arguments[0]?{}:arguments[0];if(this._throwErrorIfAlreadyBinded(),a instanceof Object)if(a instanceof Array)for(var b=0;b<a.length;b++)this._properties[b]&&(this._aliases[this._properties[b]]=a[b]);else this._aliases=a;else if("string"==typeof a){if(1!==this._properties.length)throw Error("Ambiguous aliases");var c=a;this._aliases={},this._aliases[this._properties[0]]=c}return this},writable:!0,enumerable:!0,configurable:!0},onchange:{value:function(){var a=void 0===arguments[0]?function(){}:arguments[0];return this._change=a,this},writable:!0,enumerable:!0,configurable:!0},seal:{value:function(){return this._sealed=!0,this},writable:!0,enumerable:!0,configurable:!0},unseal:{value:function(){return this._sealed=!1,this},writable:!0,enumerable:!0,configurable:!0},toggleSealing:{value:function(){return this._sealed=!this._sealed,this},writable:!0,enumerable:!0,configurable:!0},apply:{value:function(){if(this._throwErrorIfAlreadyBinded(),this._from&&this._to&&this._properties.length>0)for(var a=0;a<this._properties.length;a++)this._createProperty(this._properties[a]);return this._binded=!0,this},writable:!0,enumerable:!0,configurable:!0},destroy:{value:function(){for(var a=0;a<this._properties.length;a++)this._deleteProperty(this._properties[a]);return this._binded=!1,this},writable:!0,enumerable:!0,configurable:!0},_deleteProperty:{value:function(a){var b=this._aliases[a]||a;delete this._to[b]},writable:!0,enumerable:!0,configurable:!0},_createProperty:{value:function(a){var b=this;Object.defineProperty(this._to,this._aliases[a]||a,{enumerable:!0,configurable:!0,get:function(){var c=b._getSrc();return c[a]instanceof Function?c[a].bind(c):c[a]},set:function(c){if(b._sealed)throw Error("Trying to update a sealed property");var d=b._getSrc(),e=d[a];d[a]=c,e!==c&&b._change(c,e)}})},writable:!0,enumerable:!0,configurable:!0},_getSrc:{value:function(){var a=this._from;if(this._path.length>0)for(var b=0;b<this._path.length;b++)if(a=a[this._path[b]],!a)throw Error("unable to acces to the given property");return a},writable:!0,enumerable:!0,configurable:!0},_throwErrorIfAlreadyBinded:{value:function(){if(this._binded)throw Error("Property already binded")},writable:!0,enumerable:!0,configurable:!0}}),a}();return a}});var d=function(a,b){var c=Object.create(a.prototype),d=a.apply(c,b);return null==d||"object"!=typeof d&&"function"!=typeof d?c:d},e=function(a){return Array.isArray(a)?a:Array.from(a)};angular.module("PropertyBinder").service("PropertyBinder.services.binder",["PropertyBinder.providers.binder",function(a){return function(){for(var b=arguments.length,c=Array(b),f=0;b>f;f++)c[f]=arguments[f];return d(a,e(c))}}])}(window,window.document,window.angular);
!function(a,b,angular){" use strict; ";angular.module("PropertyBinder",[]);var c=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},d=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}();angular.module("PropertyBinder").provider("PropertyBinder.providers.binder",function(){this.$get=function(){var a=function(){function a(){var b=void 0===arguments[0]?[]:arguments[0];c(this,a),this._properties=b instanceof Array?b:[b],this._binded=!1,this._sealed=!1,this._to=void 0,this._from=void 0,this._path=[],this._aliases={},this._change=function(){}}return d(a,[{key:"from",value:function(a){var b=void 0===arguments[1]?[]:arguments[1];return this._throwErrorIfAlreadyBinded(),this._path="string"==typeof b?b=b.split("."):b,this._from=a,this}},{key:"to",value:function(a){return this._throwErrorIfAlreadyBinded(),this._to=a,this}},{key:"as",value:function(){var a=void 0===arguments[0]?{}:arguments[0];if(this._throwErrorIfAlreadyBinded(),a instanceof Object)if(a instanceof Array)for(var b=0;b<a.length;b++)this._properties[b]&&(this._aliases[this._properties[b]]=a[b]);else this._aliases=a;else if("string"==typeof a){if(1!==this._properties.length)throw Error("Ambiguous aliases");var c=a;this._aliases={},this._aliases[this._properties[0]]=c}return this}},{key:"onchange",value:function(){var a=void 0===arguments[0]?function(){}:arguments[0];return this._change=a,this}},{key:"seal",value:function(){return this._sealed=!0,this}},{key:"unseal",value:function(){return this._sealed=!1,this}},{key:"toggleSealing",value:function(){return this._sealed=!this._sealed,this}},{key:"apply",value:function(){if(this._throwErrorIfAlreadyBinded(),this._from&&this._to&&this._properties.length>0)for(var a=0;a<this._properties.length;a++)this._createProperty(this._properties[a]);return this._binded=!0,this}},{key:"destroy",value:function(){for(var a=0;a<this._properties.length;a++)this._deleteProperty(this._properties[a]);return this._binded=!1,this}},{key:"_deleteProperty",value:function(a){var b=this._aliases[a]||a;delete this._to[b]}},{key:"_createProperty",value:function(a){var b=this;Object.defineProperty(this._to,this._aliases[a]||a,{enumerable:!0,configurable:!0,get:function(){var c=b._getSrc();return c[a]instanceof Function?c[a].bind(c):c[a]},set:function(c){if(b._sealed)throw Error("Trying to update a sealed property");var d=b._getSrc(),e=d[a];d[a]=c,e!==c&&b._change(c,e)}})}},{key:"_getSrc",value:function(){var a=this._from;if(this._path.length>0)for(var b=0;b<this._path.length;b++)if(a=a[this._path[b]],!a)throw Error("unable to acces to the given property");return a}},{key:"_throwErrorIfAlreadyBinded",value:function(){if(this._binded)throw Error("Property already binded")}}]),a}();return a}});var e=Function.prototype.bind;angular.module("PropertyBinder").service("PropertyBinder.services.binder",["PropertyBinder.providers.binder",function(a){return function(){for(var b=arguments.length,c=Array(b),d=0;b>d;d++)c[d]=arguments[d];return new(e.apply(a,[null].concat(c)))}}])}(window,window.document,window.angular);

@@ -9,4 +9,6 @@ var paths = {};

var tasks = [
'grunt-6to5',
'grunt-babel',
'grunt-add-comment',
'grunt-contrib-concat',
'grunt-wrap',
'grunt-contrib-uglify'

@@ -22,6 +24,6 @@ ];

Configuration = {};
var Configuration = {};
Configuration.package = grunt.file.readJSON('package.json');
Configuration['6to5'] = {
Configuration.babel = {
options: {

@@ -38,2 +40,14 @@ sourceMap: false

}]
},
dist: {
options: {
blacklist:['useStrict']
},
files: [{
expand: true,
cwd: paths.base,
ext: '.js',
src: (pathOption ? pathOption.name : ['**/*.es6']),
dest: paths.base
}]
}

@@ -59,5 +73,5 @@ };

comments: [
Configuration.package.name,
'version: ' + Configuration.package.version,
'author: ' + Configuration.package.author,
'<%= package.name %>',
'version: <%= package.version %>',
'author: <%= package.author %>',
'generated: ' + new Date(),

@@ -74,2 +88,13 @@ 'Autogenerated, do not edit. All changes will be undone.'],

}]
},
strict: {
options: {
comments: ['use strict;'],
prepend: true,
syntaxes: {
'.js': ['"','";']
}
},
src: ['dist/<%= package.name %>.js'],
dest: 'dist/<%= package.name %>.js'
}

@@ -90,13 +115,38 @@ };

dist: {
files: {
'dist/angular-property-binder.min.js': ['src/core.js', 'src/providers/binder.js', 'src/services/binder.js']
}
src: 'dist/<%= package.name %>.js',
dest: 'dist/<%= package.name %>.min.js'
}
}
};
Configuration.concat = {
dist: {
src: [
'lib/core.js',
'lib/providers/binder.js',
'lib/services/binder.js'
],
dest: 'dist/<%= package.name %>.js'
}
};
Configuration.wrap = {
dist: {
options: {
seperator: '\n',
indent: '\t',
wrapper: ['(function (window,document,angular) {\n', '\n})(window,window.document,window.angular);']
},
src: [
'dist/<%= package.name %>.js'
],
dest: 'dist/<%= package.name %>.js'
}
};
grunt.initConfig(Configuration);
grunt.registerTask('es6', ['6to5:all', 'add_comment:common']);
grunt.registerTask('build', ['6to5:all', 'uglify:dist', 'add_comment:dist']);
};
grunt.registerTask('es6', ['babel:all', 'add_comment:common']);
grunt.registerTask('dev', ['babel:all']);
grunt.registerTask('build', ['babel:dist', 'concat:dist', 'add_comment:strict', 'uglify:dist', 'wrap:dist', 'add_comment:dist']);
}

@@ -103,0 +153,0 @@ module.exports = Grunt;

{
"name": "angular-property-binder",
"version": "0.1.11",
"version": "0.1.12",
"description": "Bind property and keep safe the reference",

@@ -20,11 +20,11 @@ "keywords": [

"devDependencies": {
"babel": "^5.1.10",
"grunt": "^0.4.5",
"grunt-6to5": "^1.0.2",
"grunt-add-comment": "^1.1.5",
"time-grunt": "^1.0.0",
"grunt-contrib-uglify": "^0.7.0"
},
"dependencies": {
"6to5": "^3.0.15"
"grunt-babel": "^5.0.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-uglify": "^0.9.1",
"grunt-wrap": "^0.3.0",
"time-grunt": "^1.1.1"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet