From e7cab6f23791bea5c89c0f6a5e5c0255f983fbb4 Mon Sep 17 00:00:00 2001 From: Alex Shvets Date: Sun, 14 Apr 2013 09:13:30 +0300 Subject: [PATCH] Build v0.7.4-beta (2013-04-14 09:06) * add ability to inject into Object.prototype, update module interface * change namespace interface * add RequireJS support * bugfix: does not seal() created objects by default * update NodeUnit browser tests look * improve documentation * refactor tests --- .version | 2 +- CHANGELOG.md | 15 ++++++++++++--- build/clone.min.js | 36 ++++++++++++++++++------------------ build/clone.min.js.map | 4 ++-- build/html | 2 +- package.json | 2 +- src/clone.js | 4 ++-- 7 files changed, 37 insertions(+), 28 deletions(-) diff --git a/.version b/.version index ee77b9e..4c9c442 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v0.7.3-beta \ No newline at end of file +v0.7.4-beta \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 229f994..f65cde1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,18 @@ -### Build v0.7.3-beta (2013-04-12 06:00) +### Build v0.7.4-beta (2013-04-14 09:06) +* add ability to inject into Object.prototype, update module interface +* change namespace interface +* add RequireJS support +* bugfix: does not seal() created objects by default +* update NodeUnit browser tests look +* improve documentation +* refactor tests + +### Build v0.7.3-beta (2013-04-12 06:00) * improve documentation * fix bug: first call applySuper() on sealed object * optimize `for` -* deploy scripts: add comments - +* deploy scripts: add comments + ### Build v0.7.2-05-beta (2013-04-06 15:35) * reverse changelog items order * deploy scripts: fix new line in build message diff --git a/build/clone.min.js b/build/clone.min.js index 6d73fa0..054dc86 100644 --- a/build/clone.min.js +++ b/build/clone.min.js @@ -1,19 +1,19 @@ -'use strict';var $object={clone:function(d,a){if(arguments.length)var b=$object.describe.apply(this,arguments);return Object.create(this,b)},create:function(d,a){var b=this.clone();return b.constructor.apply(b,arguments)||b},constructor:function Object$(a,b){a&&this.defineProperties(a,b);this.constructor===Object$&&this.seal()},describe:function(d,a){var b={},c=a?a:{configurable:!0,enumerable:!0,writable:!0},e=!(a&&a.enumerable),f;for(f in d){var h=d[f],g=Object.create(c);if("("==f[0]){var i=f.match(/^\((((get|set|const|hidden|final|writable) *)+)\) +(.+)$/); -if(i){var j=i[1].split(" ").sort();f=i[4];b[f]&&(g=b[f]);for(var k in j)switch(j[k]){case "const":g.writable=!1;break;case "final":g.configurable=!1;g.writable=!1;break;case "get":g.get=h;break;case "hidden":g.enumerable=!1;break;case "set":g.set=h;break;case "writable":g.writable=!0}}}if(g.get||g.set){if("string"==typeof h){var m=h;"string"==typeof g.get?g.get=function(){return this[m]}:g.set=function(a){this[m]=a}}g.value=void 0;g.get&&(h=void 0)}else g.value=h;if(e&&"function"==typeof h||"_"== -f[0])g.enumerable=!1;f.toUpperCase()==f&&(g.writable=!1);b[f]=g}b.hasOwnProperty("constructor")&&(c=b.constructor.value,"string"==typeof c?(e=c,c=Function("return function "+e+"(){return this.applySuper(arguments)}")(),c.typeName=e,b.constructor.value=c):c.typeName||(c.typeName=c.name||"CloneOf"+this.constructor.typeName),c.prototype=this,b.constructor.enumerable=!1);return b},applySuper:function(d,a){"string"!=typeof d&&(a=d,d="constructor");"__super__"in this||this.getSuper(!0);var b=this.__super__; -this.__super__=Object.getPrototypeOf(b);var c=b[d].apply(this,a);this.__super__=b;return c},callSuper:function(d,a,b){var c=Array.prototype.slice.call(arguments,1);return this.applySuper(d,c)},getSuper:function(d){var a=Object.getPrototypeOf(Object.getPrototypeOf(this));d&&this.defineProperty("__super__",{value:a,writable:!0,configurable:!0});return a},createSuperSafeCallback:function(d,a){if("string"==typeof d){var b=this[d];"undefined"==typeof a&&(a=this)}else b=d;var c=this,e=this.__super__;return function(){if(c.__super__=== -e)return b.apply(a||this,arguments);var d=c.__super__;c.__super__=e;var h=b.apply(a||this,arguments);c.__super__=d;return h}},getState:function(d){for(var a=$object.create(),d=d?Object.getOwnPropertyNames(this):Object.keys(this),b=0,c=d.length;b