Comparing version 2.0.1 to 2.0.2
# Change Log | ||
## [v2.0.1](https://github.com/daffl/uberproto/tree/v2.0.1) (2018-06-03) | ||
[Full Changelog](https://github.com/daffl/uberproto/compare/v2.0.0...v2.0.1) | ||
**Merged pull requests:** | ||
- Check for function before trying to copy symbols [\#15](https://github.com/daffl/uberproto/pull/15) ([daffl](https://github.com/daffl)) | ||
## [v2.0.0](https://github.com/daffl/uberproto/tree/v2.0.0) (2018-06-03) | ||
@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/daffl/uberproto/compare/1.2.0...v2.0.0) |
@@ -39,3 +39,3 @@ /* global define */ | ||
if (isFunction) { | ||
if (isFunction && HAS_SYMBOLS) { | ||
Object.getOwnPropertySymbols(old).forEach(function (name) { | ||
@@ -42,0 +42,0 @@ newMethod[name] = old[name]; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Proto=e()}(this,function(){var i="function"==typeof Object.getOwnPropertySymbols;return{create:function(){var t=Object.create(this),e="string"==typeof t.__init?t.__init:"init";return"function"==typeof t[e]&&t[e].apply(t,arguments),t},mixin:function(t,e){for(var p=e||this,u=/\b_super\b/,y=Object.getPrototypeOf(p)||p.prototype,s={},r=t,o=function(t){s[t]||(s[t]=Object.getOwnPropertyDescriptor(r,t))};Object.getOwnPropertyNames(r).forEach(o),i&&Object.getOwnPropertySymbols(r).forEach(o),(r=Object.getPrototypeOf(r))&&Object.getPrototypeOf(r););var n=function(t){var r,o,n,i,c,e,f=s[t];"function"==typeof f.value&&u.test(f.value)&&(f.value=(r=y,o=p[t],n=t,i=f.value,e=function(){var t=this._super;this._super=c?o:r[n];var e=i.apply(this,arguments);return this._super=t,e},(c="function"==typeof o)&&Object.getOwnPropertySymbols(o).forEach(function(t){e[t]=o[t]}),e)),Object.defineProperty(p,t,f)};return Object.keys(s).forEach(n),i&&Object.getOwnPropertySymbols(s).forEach(n),p},extend:function(t,e){return this.mixin(t,Object.create(e||this))},proxy:function(t){var e=this[t],r=Array.prototype.slice.call(arguments,1);return r.unshift(this),e.bind.apply(e,r)}}}); | ||
!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Proto=e()}(this,function(){var a="function"==typeof Object.getOwnPropertySymbols;return{create:function(){var t=Object.create(this),e="string"==typeof t.__init?t.__init:"init";return"function"==typeof t[e]&&t[e].apply(t,arguments),t},mixin:function(t,e){for(var p=e||this,u=/\b_super\b/,y=Object.getPrototypeOf(p)||p.prototype,s={},r=t,o=function(t){s[t]||(s[t]=Object.getOwnPropertyDescriptor(r,t))};Object.getOwnPropertyNames(r).forEach(o),a&&Object.getOwnPropertySymbols(r).forEach(o),(r=Object.getPrototypeOf(r))&&Object.getPrototypeOf(r););var n=function(t){var r,o,n,i,c,e,f=s[t];"function"==typeof f.value&&u.test(f.value)&&(f.value=(r=y,o=p[t],n=t,i=f.value,e=function(){var t=this._super;this._super=c?o:r[n];var e=i.apply(this,arguments);return this._super=t,e},(c="function"==typeof o)&&a&&Object.getOwnPropertySymbols(o).forEach(function(t){e[t]=o[t]}),e)),Object.defineProperty(p,t,f)};return Object.keys(s).forEach(n),a&&Object.getOwnPropertySymbols(s).forEach(n),p},extend:function(t,e){return this.mixin(t,Object.create(e||this))},proxy:function(t){var e=this[t],r=Array.prototype.slice.call(arguments,1);return r.unshift(this),e.bind.apply(e,r)}}}); |
@@ -39,3 +39,3 @@ /* global define */ | ||
if (isFunction) { | ||
if (isFunction && HAS_SYMBOLS) { | ||
Object.getOwnPropertySymbols(old).forEach(function (name) { | ||
@@ -42,0 +42,0 @@ newMethod[name] = old[name]; |
{ | ||
"name": "uberproto", | ||
"description": "JavaScript object inheritance sugar: Easy extension, mixins, super methods, proxies", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"homepage": "http://daffl.github.com/uberproto", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -16,3 +16,3 @@ # Uberproto | ||
With a small footprint (about 1.2Kb minified) and an easy to handle API of just four methods it also doesn't add a lot of baggage to your JavaScript application. | ||
With a small footprint (about 0.5Kb minified) and an easy to handle API of just four methods it also doesn't add a lot of baggage to your JavaScript application. | ||
@@ -19,0 +19,0 @@ ## Usage |
22279