angular-property-binder
Advanced tools
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
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
34104
0
17
337
8
1
- Removed6to5@^3.0.15
- Removed6to5@3.6.5(transitive)
- Removedacorn@5.7.4(transitive)
- Removedacorn-6to5@0.11.1-31(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedansi-regex@0.2.1(transitive)
- Removedansi-styles@1.1.0(transitive)
- Removedast-types@0.6.160.9.6(transitive)
- Removedasync-each@0.1.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedchalk@0.5.1(transitive)
- Removedchokidar@0.12.6(transitive)
- Removedcommander@2.6.0(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedcore-js@0.5.4(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetect-indent@3.0.0(transitive)
- Removeddetective@4.7.1(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesprima@3.1.3(transitive)
- Removedesprima-fb@10001.1.0-dev-harmony-fb(transitive)
- Removedestraverse@1.9.1(transitive)
- Removedesutils@1.1.6(transitive)
- Removedfs-readdir-recursive@0.1.0(transitive)
- Removedfsevents@0.3.8(transitive)
- Removedget-stdin@3.0.2(transitive)
- Removedglob@5.0.15(transitive)
- Removedglobals@5.1.0(transitive)
- Removedgraceful-fs@2.0.34.2.11(transitive)
- Removedhas-ansi@0.1.0(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjs-tokenizer@1.3.3(transitive)
- Removedjsesc@0.5.0(transitive)
- Removedlodash@3.0.0(transitive)
- Removedlru-cache@2.7.34.1.5(transitive)
- Removedminimatch@0.2.143.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedms@2.0.0(transitive)
- Removednan@2.22.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedoutput-file-sync@1.1.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedprivate@0.1.6(transitive)
- Removedpseudomap@1.0.2(transitive)
- Removedq@1.5.1(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedreaddirp@1.3.0(transitive)
- Removedrecast@0.11.230.9.18(transitive)
- Removedregenerate@1.4.2(transitive)
- Removedregenerator-6to5@0.8.10-1(transitive)
- Removedregexpu@1.1.0(transitive)
- Removedregjsgen@0.2.0(transitive)
- Removedregjsparser@0.1.5(transitive)
- Removedrepeating@1.1.3(transitive)
- Removedroadrunner@1.0.4(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsigmund@1.0.1(transitive)
- Removedsource-map@0.1.320.1.430.5.7(transitive)
- Removedsource-map-support@0.2.9(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@0.3.0(transitive)
- Removedsupports-color@0.2.01.2.0(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtmp@0.0.33(transitive)
- Removeduseragent@2.3.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedxtend@4.0.2(transitive)
- Removedyallist@2.1.2(transitive)