From b0ce1c49c5f726db6b32f7b2f31062ea5bd19522 Mon Sep 17 00:00:00 2001 From: Nicolas Petton Date: Fri, 17 Mar 2017 10:32:05 +0100 Subject: [PATCH] Rebuild klassified[.min].js --- dist/klassified.js | 18 ++++++++++++++++++ dist/klassified.min.js | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dist/klassified.js b/dist/klassified.js index 970ef4a..35c41da 100644 --- a/dist/klassified.js +++ b/dist/klassified.js @@ -567,6 +567,23 @@ define('object',[], function() { return allSubclasses; }; + /** + * Return all concrete subclasses. + */ + object.allConcreteSubclasses = function() { + var allConcreteSubclasses = this.subclasses.filter(function(klass) { + return !klass.isAbstract; + }); + + this.subclasses.forEach(function(klass) { + klass.allConcreteSubclasses().forEach(function(subclass) { + allConcreteSubclasses.push(subclass); + }); + }); + + return allConcreteSubclasses; + }; + object.subclassResponsibility = subclassResponsibility; /** @@ -676,6 +693,7 @@ define('object',[], function() { that.singletonSubclass = object.singletonSubclass; that.abstractSubclass = object.abstractSubclass; that.allSubclasses = object.allSubclasses; + that.allConcreteSubclasses = object.allConcreteSubclasses; that.subclassResponsibility = subclassResponsibility; that.extend = object.extend; that.extensions = []; diff --git a/dist/klassified.min.js b/dist/klassified.min.js index 9562844..0f5c1d3 100644 --- a/dist/klassified.min.js +++ b/dist/klassified.min.js @@ -3,4 +3,4 @@ * Released under MIT license, http://github.com/requirejs/almond/LICENSE */ -!function(e,n){"function"==typeof define&&define.amd?define(n):e.klassified=n(e.$)}(this,function(e){var n,t,s;return function(e){function i(e,n){return j.call(e,n)}function r(e,n){var t,s,i,r,c,o,u,a,f,l,p,b,h=n&&n.split("/"),d=m.map,g=d&&d["*"]||{};if(e){for(e=e.split("/"),c=e.length-1,m.nodeIdCompat&&A.test(e[c])&&(e[c]=e[c].replace(A,"")),"."===e[0].charAt(0)&&h&&(b=h.slice(0,h.length-1),e=b.concat(e)),f=0;f0&&(e.splice(f-1,2),f-=2)}e=e.join("/")}if((h||g)&&d){for(t=e.split("/"),f=t.length;f>0;f-=1){if(s=t.slice(0,f).join("/"),h)for(l=h.length;l>0;l-=1)if(i=d[h.slice(0,l).join("/")],i&&(i=i[s])){r=i,o=f;break}if(r)break;!u&&g&&g[s]&&(u=g[s],a=f)}!r&&u&&(r=u,o=a),r&&(t.splice(0,o,r),e=t.join("/"))}return e}function c(n,t){return function(){var s=x.call(arguments,0);return"string"!=typeof s[0]&&1===s.length&&s.push(null),h.apply(e,s.concat([n,t]))}}function o(e){return function(n){return r(n,e)}}function u(e){return function(n){v[e]=n}}function a(n){if(i(E,n)){var t=E[n];delete E[n],y[n]=!0,b.apply(e,t)}if(!i(v,n)&&!i(y,n))throw new Error("No "+n);return v[n]}function f(e){var n,t=e?e.indexOf("!"):-1;return t>-1&&(n=e.substring(0,t),e=e.substring(t+1,e.length)),[n,e]}function l(e){return e?f(e):[]}function p(e){return function(){return m&&m.config&&m.config[e]||{}}}var b,h,d,g,v={},E={},m={},y={},j=Object.prototype.hasOwnProperty,x=[].slice,A=/\.js$/;d=function(e,n){var t,s=f(e),i=s[0],c=n[1];return e=s[1],i&&(i=r(i,c),t=a(i)),i?e=t&&t.normalize?t.normalize(e,o(c)):r(e,c):(e=r(e,c),s=f(e),i=s[0],e=s[1],i&&(t=a(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:t}},g={require:function(e){return c(e)},exports:function(e){var n=v[e];return"undefined"!=typeof n?n:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:p(e)}}},b=function(n,t,s,r){var o,f,p,b,h,m,j,x=[],A=typeof s;if(r=r||n,m=l(r),"undefined"===A||"function"===A){for(t=!t.length&&s.length?["require","exports","module"]:t,h=0;h0&&(e.splice(f-1,2),f-=2)}e=e.join("/")}if((h||g)&&d){for(t=e.split("/"),f=t.length;f>0;f-=1){if(s=t.slice(0,f).join("/"),h)for(l=h.length;l>0;l-=1)if(r=d[h.slice(0,l).join("/")],r&&(r=r[s])){i=r,o=f;break}if(i)break;!u&&g&&g[s]&&(u=g[s],a=f)}!i&&u&&(i=u,o=a),i&&(t.splice(0,o,i),e=t.join("/"))}return e}function c(n,t){return function(){var s=j.call(arguments,0);return"string"!=typeof s[0]&&1===s.length&&s.push(null),h.apply(e,s.concat([n,t]))}}function o(e){return function(n){return i(n,e)}}function u(e){return function(n){E[e]=n}}function a(n){if(r(v,n)){var t=v[n];delete v[n],y[n]=!0,b.apply(e,t)}if(!r(E,n)&&!r(y,n))throw new Error("No "+n);return E[n]}function f(e){var n,t=e?e.indexOf("!"):-1;return t>-1&&(n=e.substring(0,t),e=e.substring(t+1,e.length)),[n,e]}function l(e){return e?f(e):[]}function p(e){return function(){return m&&m.config&&m.config[e]||{}}}var b,h,d,g,E={},v={},m={},y={},C=Object.prototype.hasOwnProperty,j=[].slice,A=/\.js$/;d=function(e,n){var t,s=f(e),r=s[0],c=n[1];return e=s[1],r&&(r=i(r,c),t=a(r)),r?e=t&&t.normalize?t.normalize(e,o(c)):i(e,c):(e=i(e,c),s=f(e),r=s[0],e=s[1],r&&(t=a(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:t}},g={require:function(e){return c(e)},exports:function(e){var n=E[e];return"undefined"!=typeof n?n:E[e]={}},module:function(e){return{id:e,uri:"",exports:E[e],config:p(e)}}},b=function(n,t,s,i){var o,f,p,b,h,m,C,j=[],A=typeof s;if(i=i||n,m=l(i),"undefined"===A||"function"===A){for(t=!t.length&&s.length?["require","exports","module"]:t,h=0;h