lifecycle
Advanced tools
Comparing version 1.0.3 to 1.0.4
/* | ||
Lifecycle.js 1.0.3 | ||
Lifecycle.js 1.0.4 | ||
(c) 2011, 2012 Kevin Malakoff - http://kmalakoff.github.com/json-serialize/ | ||
@@ -23,3 +23,3 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) | ||
/* | ||
Lifecycle.js 1.0.3 | ||
Lifecycle.js 1.0.4 | ||
(c) 2011, 2012 Kevin Malakoff - http://kmalakoff.github.com/json-serialize/ | ||
@@ -36,3 +36,3 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) | ||
LC.VERSION = "1.0.3"; | ||
LC.VERSION = "1.0.4"; | ||
@@ -39,0 +39,0 @@ isArray = function(obj) { |
@@ -1,1 +0,1 @@ | ||
(function(){return function(factory){if(typeof define==="function"&&define.amd){return define("lifecycle",factory)}else{return factory.call(this)}}(function(){var LC,copyProps,isArray;LC=this.LC=typeof exports!=="undefined"?exports:{};LC.VERSION="1.0.3";isArray=function(obj){return obj.constructor===Array};copyProps=function(dest,source){var key,value;for(key in source){value=source[key];dest[key]=value}return dest};var ctor=function(){};var inherits=function(parent,protoProps,staticProps){var child;if(protoProps&&protoProps.hasOwnProperty("constructor")){child=protoProps.constructor}else{child=function(){parent.apply(this,arguments)}}copyProps(child,parent);ctor.prototype=parent.prototype;child.prototype=new ctor;if(protoProps)copyProps(child.prototype,protoProps);if(staticProps)copyProps(child,staticProps);child.prototype.constructor=child;child.__super__=parent.prototype;return child};var extend=function(protoProps,classProps){var child=inherits(this,protoProps,classProps);child.extend=this.extend;return child};LC.own=function(obj,options){var clone,i,j,key,len,len1,value;if(!obj||typeof obj!=="object"){return obj}options||(options={});if(isArray(obj)){if(options.share_collection){for(i=0,len=obj.length;i<len;i++){value=obj[i];LC.own(value,{prefer_clone:options.prefer_clone})}return obj}else{clone=[];for(j=0,len1=obj.length;j<len1;j++){value=obj[j];clone.push(LC.own(value,{prefer_clone:options.prefer_clone}))}return clone}}else if(options.properties){if(options.share_collection){for(key in obj){value=obj[key];LC.own(value,{prefer_clone:options.prefer_clone})}return obj}else{clone={};for(key in obj){value=obj[key];clone[key]=LC.own(value,{prefer_clone:options.prefer_clone})}return clone}}else if(obj.retain){if(options.prefer_clone&&obj.clone){return obj.clone()}else{return obj.retain()}}else if(obj.clone){return obj.clone()}return obj};LC.disown=function(obj,options){var i,index,key,len,value;if(options==null){options={}}if(!obj||typeof obj!=="object"){return obj}if(isArray(obj)){if(options.clear_values){for(index in obj){value=obj[index];LC.disown(value,{clear_values:options.clear_values});obj[index]=null}}else{for(i=0,len=obj.length;i<len;i++){value=obj[i];LC.disown(value,{remove_values:options.remove_values})}if(options.remove_values){obj.length=0}}}else if(options.properties){if(options.clear_values){for(key in obj){value=obj[key];LC.disown(value,{clear_values:options.clear_values});obj[key]=null}}else{for(key in obj){value=obj[key];LC.disown(value,{remove_values:options.remove_values});delete obj[key]}}}else if(obj.release){obj.release()}else if(obj.destroy){obj.destroy()}return obj};LC.RefCountable=function(){RefCountable.extend=extend;function RefCountable(){this.__LC||(this.__LC={});this.__LC.ref_count=1}RefCountable.prototype.__destroy=function(){};RefCountable.prototype.retain=function(){if(this.__LC.ref_count<=0){throw"RefCountable: ref_count is corrupt: "+this.__LC.ref_count}this.__LC.ref_count++;return this};RefCountable.prototype.release=function(){if(this.__LC.ref_count<=0){throw"RefCountable: ref_count is corrupt: "+this.__LC.ref_count}this.__LC.ref_count--;if(!this.__LC.ref_count){this.__destroy()}return this};RefCountable.prototype.refCount=function(){return this.__LC.ref_count};return RefCountable}();return LC})}).call(this); | ||
(function(){return function(factory){if(typeof define==="function"&&define.amd){return define("lifecycle",factory)}else{return factory.call(this)}}(function(){var LC,copyProps,isArray;LC=this.LC=typeof exports!=="undefined"?exports:{};LC.VERSION="1.0.4";isArray=function(obj){return obj.constructor===Array};copyProps=function(dest,source){var key,value;for(key in source){value=source[key];dest[key]=value}return dest};var ctor=function(){};var inherits=function(parent,protoProps,staticProps){var child;if(protoProps&&protoProps.hasOwnProperty("constructor")){child=protoProps.constructor}else{child=function(){parent.apply(this,arguments)}}copyProps(child,parent);ctor.prototype=parent.prototype;child.prototype=new ctor;if(protoProps)copyProps(child.prototype,protoProps);if(staticProps)copyProps(child,staticProps);child.prototype.constructor=child;child.__super__=parent.prototype;return child};var extend=function(protoProps,classProps){var child=inherits(this,protoProps,classProps);child.extend=this.extend;return child};LC.own=function(obj,options){var clone,i,j,key,len,len1,value;if(!obj||typeof obj!=="object"){return obj}options||(options={});if(isArray(obj)){if(options.share_collection){for(i=0,len=obj.length;i<len;i++){value=obj[i];LC.own(value,{prefer_clone:options.prefer_clone})}return obj}else{clone=[];for(j=0,len1=obj.length;j<len1;j++){value=obj[j];clone.push(LC.own(value,{prefer_clone:options.prefer_clone}))}return clone}}else if(options.properties){if(options.share_collection){for(key in obj){value=obj[key];LC.own(value,{prefer_clone:options.prefer_clone})}return obj}else{clone={};for(key in obj){value=obj[key];clone[key]=LC.own(value,{prefer_clone:options.prefer_clone})}return clone}}else if(obj.retain){if(options.prefer_clone&&obj.clone){return obj.clone()}else{return obj.retain()}}else if(obj.clone){return obj.clone()}return obj};LC.disown=function(obj,options){var i,index,key,len,value;if(options==null){options={}}if(!obj||typeof obj!=="object"){return obj}if(isArray(obj)){if(options.clear_values){for(index in obj){value=obj[index];LC.disown(value,{clear_values:options.clear_values});obj[index]=null}}else{for(i=0,len=obj.length;i<len;i++){value=obj[i];LC.disown(value,{remove_values:options.remove_values})}if(options.remove_values){obj.length=0}}}else if(options.properties){if(options.clear_values){for(key in obj){value=obj[key];LC.disown(value,{clear_values:options.clear_values});obj[key]=null}}else{for(key in obj){value=obj[key];LC.disown(value,{remove_values:options.remove_values});delete obj[key]}}}else if(obj.release){obj.release()}else if(obj.destroy){obj.destroy()}return obj};LC.RefCountable=function(){RefCountable.extend=extend;function RefCountable(){this.__LC||(this.__LC={});this.__LC.ref_count=1}RefCountable.prototype.__destroy=function(){};RefCountable.prototype.retain=function(){if(this.__LC.ref_count<=0){throw"RefCountable: ref_count is corrupt: "+this.__LC.ref_count}this.__LC.ref_count++;return this};RefCountable.prototype.release=function(){if(this.__LC.ref_count<=0){throw"RefCountable: ref_count is corrupt: "+this.__LC.ref_count}this.__LC.ref_count--;if(!this.__LC.ref_count){this.__destroy()}return this};RefCountable.prototype.refCount=function(){return this.__LC.ref_count};return RefCountable}();return LC})}).call(this); |
{ | ||
"author" : {"name": "Kevin Malakoff", "url": "https://github.com/kmalakoff"}, | ||
"name" : "lifecycle", | ||
"description" : "Lifecycle.js provides conventions and helpers to manage the life cycles of Javascript instances.", | ||
"keywords" : ["lifecycle", "lifecyclejs", "json", "util", "server", "client"], | ||
"url" : "http://kmalakoff.github.com/lifecycle/", | ||
"homepage" : "http://kmalakoff.github.com/lifecycle/", | ||
"author": { | ||
"name": "Kevin Malakoff", | ||
"url": "https://github.com/kmalakoff" | ||
}, | ||
"name": "lifecycle", | ||
"description": "Lifecycle.js provides conventions and helpers to manage the life cycles of Javascript instances.", | ||
"keywords": [ | ||
"lifecycle", | ||
"lifecyclejs", | ||
"json", | ||
"util", | ||
"server", | ||
"client" | ||
], | ||
"license": "MIT", | ||
"url": "http://kmalakoff.github.com/lifecycle/", | ||
"homepage": "http://kmalakoff.github.com/lifecycle/", | ||
"repository": { | ||
@@ -13,5 +23,4 @@ "type": "git", | ||
}, | ||
"main" : "lifecycle.js", | ||
"version" : "1.0.3" | ||
} | ||
"main": "lifecycle.js", | ||
"version": "1.0.4" | ||
} |
@@ -7,4 +7,4 @@ Lifecycle.js provides conventions and helpers to manage the life cycles of Javascript instances. | ||
* [Development version](https://raw.github.com/kmalakoff/lifecycle/1.0.3/lifecycle.js) | ||
* [Production version](https://raw.github.com/kmalakoff/lifecycle/1.0.3/lifecycle.min.js) | ||
* [Development version](https://raw.github.com/kmalakoff/lifecycle/1.0.4/lifecycle.js) | ||
* [Production version](https://raw.github.com/kmalakoff/lifecycle/1.0.4/lifecycle.min.js) | ||
@@ -11,0 +11,0 @@ ###Module Loading |
No License Found
License(Experimental) License information could not be found
Found 1 instance in 1 package
0
13818