angular-property-binder
Advanced tools
Comparing version 0.1.9 to 0.1.10
// angular-property-binder | ||
// version: 0.1.8 | ||
// version: 0.1.10 | ||
// author: Gaignoux Nicolas | ||
// generated: Wed Feb 25 2015 10:55:08 GMT+0100 (Europe de l’Ouest) | ||
// generated: Thu Mar 05 2015 02:05:48 GMT+0100 (Europe de l’Ouest) | ||
// 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); |
{ | ||
"name": "angular-property-binder", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Bind property and keep safe the reference", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -44,6 +44,2 @@ angular-property-binder | ||
> Cranks out a collision resistant hash, relatively quickly. | ||
> Not suitable for passwords, or sensitive information. | ||
*Synchronous only* | ||
#### Params: | ||
@@ -50,0 +46,0 @@ - **value**: String or Array. property name to bind. |
27181
275