Permalink
Browse files

v0.0.8

* Added check for define.amd
  • Loading branch information...
1 parent b5147c4 commit c6d435d087a2984034ba6bd1bb893b6f4ed6751f @doug-martin committed Jun 5, 2013
Showing with 8 additions and 7 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 README.md
  3. +2 −2 extender-min.js
  4. +1 −1 extender.js
  5. +2 −2 package.json
View
1 .gitignore
@@ -1,2 +1,3 @@
.idea
+*.iml
node_modules
View
4 README.md
@@ -1,9 +1,9 @@
<a name="top"></a>
-[![build status](https://secure.travis-ci.org/doug-martin/extender.png)](http://travis-ci.org/doug-martin/extender)
+[![build status](https://secure.travis-ci.org/doug-martin/extender.png)](https://travis-ci.org/doug-martin/extender)
-[![browser support](http://ci.testling.com/doug-martin/extender.png)](http://ci.testling.com/doug-martin/extender)
+[![browser support](https://ci.testling.com/doug-martin/extender.png)](https://ci.testling.com/doug-martin/extender)
# Extender
View
4 extender-min.js
@@ -1,3 +1,3 @@
-/*! extender - v0.0.7 - 2013-04-16
+/*! extender - v0.0.8 - 2013-06-05
* Copyright (c) 2013 Doug Martin (blog.dougamartin.com); Licensed MIT */
-(function(){function n(n){function e(n,e){if(n&&n.length)for(var t=0,r=n.length;r>t;t++)if(n[t]===e)return t;return-1}function t(n){return"[object Array]"===Object.prototype.toString.call(n)}function r(e){function t(n,e,t){if("function"!=typeof t)throw new TypeError("when extending type you must provide a function");var r;r="constructor"===e?function(){this._super(arguments),t.apply(this,arguments)}:function r(){var n=o.call(arguments);n.unshift(this._value);var e=t.apply(this,n);return e!==u?this.__extender__(e):this},n[e]=r}function r(n,e,t){if("function"!=typeof t)throw new TypeError("when extending type you must provide a function");var r;r="constructor"===e?function(){this._super(arguments),t.apply(this,arguments)}:function r(){var n=o.call(arguments);return n.unshift(this._value),t.apply(this,n)},n[e]=r}function s(n,e,u){for(var o in e)e.hasOwnProperty(o)&&("getters"!==o&&"setters"!==o?"noWrap"===o?s(n,e[o],!0):u?r(n,o,e[o]):t(n,o,e[o]):n[o]=e[o])}function f(n){var e,t,r=n;if(!(n instanceof d)){var u=d;for(e=0,t=p.length;t>e;e++){var o=p[e];o[0](n)&&(u=u.extend({instance:o[1]}))}r=new u(n),r.__extender__=f}return r}function c(){return!0}function a(n,e){if(arguments.length){"object"==typeof n&&(e=n,n=c),e=e||{};var r={};s(r,e),r.hasOwnProperty("constructor")||(e.hasOwnProperty("constructor")?t(r,"constructor",e.constructor):r.constructor=function(){this._super(arguments)}),p.push([n,r])}return f}function _(n){return n&&n.hasOwnProperty("__defined__")&&(f.__defined__=p=p.concat(n.__defined__)),i(f,n,["define","extend","expose","__defined__"]),f}e=e||[];var d=n({instance:{constructor:function(n){this._value=n},value:function(){return this._value},eq:function(n){return this.__extender__(this._value===n)},neq:function(n){return this.__extender__(this._value!==n)},print:function(){return console.log(this._value),this}}}),p=[];return f.define=a,f.extend=_,f.expose=function(){for(var n,e=0,t=arguments.length;t>e;e++)n=arguments[e],"object"==typeof n&&i(f,n,["define","extend","expose","__defined__"]);return f},f.__defined__=p,f}var u,o=Array.prototype.slice,i=function(){function n(n,t,r){var u,o;for(u in t)t.hasOwnProperty(u)&&-1===e(r,u)&&(o=t[u],u in n&&n[u]===o||(n[u]=o));return n}return function(e){e||(e={});var r=arguments.length,u=arguments[arguments.length-1];t(u)?r--:u=[];for(var o=1;r>o;o++)n(e,arguments[o],u);return e}}();return{define:function(){return r().define.apply(r,arguments)},extend:function(n){return r().define().extend(n)}}}"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=n(require("declare.js"))):"function"==typeof define?define(["declare"],function(e){return n(e)}):this.extender=n(this.declare)}).call(this);
+(function(){function n(n){function e(n,e){if(n&&n.length)for(var t=0,r=n.length;r>t;t++)if(n[t]===e)return t;return-1}function t(n){return"[object Array]"===Object.prototype.toString.call(n)}function r(e){function t(n,e,t){if("function"!=typeof t)throw new TypeError("when extending type you must provide a function");var r;r="constructor"===e?function(){this._super(arguments),t.apply(this,arguments)}:function r(){var n=o.call(arguments);n.unshift(this._value);var e=t.apply(this,n);return e!==u?this.__extender__(e):this},n[e]=r}function r(n,e,t){if("function"!=typeof t)throw new TypeError("when extending type you must provide a function");var r;r="constructor"===e?function(){this._super(arguments),t.apply(this,arguments)}:function r(){var n=o.call(arguments);return n.unshift(this._value),t.apply(this,n)},n[e]=r}function f(n,e,u){for(var o in e)e.hasOwnProperty(o)&&("getters"!==o&&"setters"!==o?"noWrap"===o?f(n,e[o],!0):u?r(n,o,e[o]):t(n,o,e[o]):n[o]=e[o])}function s(n){var e,t,r=n;if(!(n instanceof d)){var u=d;for(e=0,t=p.length;t>e;e++){var o=p[e];o[0](n)&&(u=u.extend({instance:o[1]}))}r=new u(n),r.__extender__=s}return r}function c(){return!0}function a(n,e){if(arguments.length){"object"==typeof n&&(e=n,n=c),e=e||{};var r={};f(r,e),r.hasOwnProperty("constructor")||(e.hasOwnProperty("constructor")?t(r,"constructor",e.constructor):r.constructor=function(){this._super(arguments)}),p.push([n,r])}return s}function _(n){return n&&n.hasOwnProperty("__defined__")&&(s.__defined__=p=p.concat(n.__defined__)),i(s,n,["define","extend","expose","__defined__"]),s}e=e||[];var d=n({instance:{constructor:function(n){this._value=n},value:function(){return this._value},eq:function(n){return this.__extender__(this._value===n)},neq:function(n){return this.__extender__(this._value!==n)},print:function(){return console.log(this._value),this}}}),p=[];return s.define=a,s.extend=_,s.expose=function(){for(var n,e=0,t=arguments.length;t>e;e++)n=arguments[e],"object"==typeof n&&i(s,n,["define","extend","expose","__defined__"]);return s},s.__defined__=p,s}var u,o=Array.prototype.slice,i=function(){function n(n,t,r){var u,o;for(u in t)t.hasOwnProperty(u)&&-1===e(r,u)&&(o=t[u],u in n&&n[u]===o||(n[u]=o));return n}return function(e){e||(e={});var r=arguments.length,u=arguments[arguments.length-1];t(u)?r--:u=[];for(var o=1;r>o;o++)n(e,arguments[o],u);return e}}();return{define:function(){return r().define.apply(r,arguments)},extend:function(n){return r().define().extend(n)}}}"undefined"!=typeof exports?"undefined"!=typeof module&&module.exports&&(module.exports=n(require("declare.js"))):"function"==typeof define&&define.amd?define(["declare"],function(e){return n(e)}):this.extender=n(this.declare)}).call(this);
View
2 extender.js
@@ -529,7 +529,7 @@
module.exports = defineExtender(require("declare.js"));
}
- } else if ("function" === typeof define) {
+ } else if ("function" === typeof define && define.amd) {
define(["declare"], function (declare) {
return defineExtender(declare);
});
View
4 package.json
@@ -1,6 +1,6 @@
{
"name": "extender",
- "version": "0.0.7",
+ "version": "0.0.8",
"description": "Easily create object decorators!",
"main": "index.js",
"scripts": {
@@ -22,7 +22,7 @@
"testling": {
"files": "test/browserling.js",
"browsers": [
- "ie/6..latest",
+ "ie/8..latest",
"chrome/20..latest",
"firefox/14..latest",
"safari/latest",

0 comments on commit c6d435d

Please sign in to comment.