Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

jslint fixes

  • Loading branch information...
commit 6e8253b43ae3fca657a4e1153b3ee2814d240b69 1 parent a66cc60
Mike Koss authored
6 namespace-plus.js
View
@@ -5,8 +5,9 @@
(function(global) {
var globalNamespace = global['namespace'];
- var Module;
- var VERSION = '3.0.0';
+ var VERSION = '3.0.1';
+
+ function Module() {}
function numeric(s) {
if (!s) {
@@ -22,7 +23,6 @@
}
Module = globalNamespace.constructor;
} else {
- function Module () {};
global['namespace'] = globalNamespace = new Module();
}
globalNamespace['VERSION'] = VERSION;
12 namespace-plus.min.js
View
@@ -1,7 +1,7 @@
-(function(c){function j(b){if(!b)return 0;b=b.split(".");return 1E4*parseInt(b[0])+100*parseInt(b[1])+parseInt(b[2])}function h(b){for(var b=b.replace(/-/g,"_"),b=b.split("."),a=i,e=0;e<b.length;e++)a[b[e]]===void 0&&(a[b[e]]=new f),a=a[b[e]];return a}var i=c.namespace,f;if(i){if(j("3.0.0")<=j(i.VERSION))return;f=i.constructor}else f=function(){},c.namespace=i=new f;i.VERSION="3.0.0";c=f.prototype;c.module=function(b,a){var e=h(b);a&&a(e,h);return e};c.extend=function(b){for(var a in b)b.hasOwnProperty(a)&&
-(this[a]=b[a])}})(this);namespace.module("org.startpad.types",function(c){function j(a,b){return h(a)==b}function h(a){if(a===void 0)return"undefined";if(a===null)return"null";var b=Object.prototype.toString.call(a).match(/\[object (.*)\]/)[1].toLowerCase();i.indexOf(b)==-1&&(b=typeof a);return b}c.extend({VERSION:"0.1.0",isArguments:function(a){return j(a,"arguments")},isArray:function(a){return j(a,"array")},copyArray:function(a){return Array.prototype.slice.call(a)},isType:j,typeOf:h,extend:function(a){var e,c,g,d;a===
-void 0&&(a={});for(e=1;e<arguments.length;e++){g=arguments[e];for(d in g)g.hasOwnProperty(d)&&(a[d]=g[d]);if(f)for(c=0;c<b.length;c++)d=b[c],g.hasOwnProperty(d)&&(a[d]=g[d])}return a},project:function(a,b){for(var c={},g=0;g<b.length;g++){var d=b[g];a&&a.hasOwnProperty(d)&&(c[d]=a[d])}return c},getFunctionName:function(a){if(typeof a=="function"){a=a.toString().match(/function\s*(\S+)\s*\(/);if(!a)return"";return a[1]}}});var i=["number","string","boolean","array","function","date","regexp","arguments",
-"undefined","null"],f=!{toString:!0}.propertyIsEnumerable("toString"),b=["toString","toLocaleString","valueOf","constructor","isPrototypeOf"]});namespace.module("org.startpad.funcs",function(c,j){function h(d){if(!d)return 0;d=d.split(".");return 1E4*parseInt(d[0])+100*parseInt(d[1])+parseInt(d[2])}function i(d,a,b,c){if(!(d._patches&&h(d._patches[a])>=h(b)))d._patches=d._patches||{},d._patches[a]=b,f(d,c)}function f(d,a){g.extend(d.prototype,a)}function b(d,a){function b(d,a){for(var c=g.copyArray(d),a=g.copyArray(a),e=0;e<c.length;e++)c[e]===void 0&&(c[e]=a.shift());return c.concat(a)}var c;c=arguments.length==3&&g.isArguments(arguments[2])?
-Array.prototype.slice.call(arguments[2],self1):Array.prototype.slice.call(arguments,2);return function(){return d.apply(a||this,b(c,arguments))}}function a(d,a){function b(){return a.call(this,d,arguments,b)}a.call(d,void 0,arguments,b);return b}function e(a){function b(){}b.prototype=a;return new b}function k(a,b,c){a.prototype=e(b.prototype);a.prototype.constructor=a;a.prototype._super=b;a.prototype._proto=b.prototype;f(a,c)}var g=j("org.startpad.types");c.extend({VERSION:"0.2.1",methods:f,bind:b,
-decorate:a,shadow:e,subclass:k,numericVersion:h,monkeyPatch:i,patch:function(){i(Function,"org.startpad.funcs",c.VERSION,{methods:function(a){f(this,a)},curry:function(){var a=[this,void 0].concat(g.copyArray(arguments));return b.apply(void 0,a)},curryThis:function(){var a=g.copyArray(arguments);a.unshift(this);return b.apply(void 0,a)},decorate:function(b){return a(this,b)},subclass:function(a,b){return k(this,a,b)}});return c}})});namespace.module("org.startpad.string",function(c,j){function h(b,a,c){c=c||f;return b=b.replace(c,function(b,c){for(var d=a,e=c.split("."),f=0;f<e.length;f++){var c=e[f],h=parseInt(c),d=isNaN(h)?d[c]:d[h];if(d==void 0)return""}return d})}var i=j("org.startpad.funcs");c.extend({VERSION:"0.1.0",patch:function(){i.monkeyPatch(String,"org.startpad.string",c.VERSION,{format:function(){return arguments.length==1&&typeof arguments[0]=="object"?h(this,arguments[0]):h(this,arguments)}});return c},format:h});
+(function(c){function i(){}function h(b){if(!b)return 0;b=b.split(".");return 1E4*parseInt(b[0])+100*parseInt(b[1])+parseInt(b[2])}function j(b){for(var b=b.replace(/-/g,"_"),b=b.split("."),a=f,e=0;e<b.length;e++)a[b[e]]===void 0&&(a[b[e]]=new i),a=a[b[e]];return a}var f=c.namespace;if(f){if(h("3.0.1")<=h(f.VERSION))return;i=f.constructor}else c.namespace=f=new i;f.VERSION="3.0.1";c=i.prototype;c.module=function(b,a){var e=j(b);a&&a(e,j);return e};c.extend=function(b){for(var a in b)b.hasOwnProperty(a)&&
+(this[a]=b[a])}})(this);namespace.module("org.startpad.types",function(c){function i(a,b){return h(a)==b}function h(a){if(a===void 0)return"undefined";if(a===null)return"null";var b=Object.prototype.toString.call(a).match(/\[object (.*)\]/)[1].toLowerCase();j.indexOf(b)==-1&&(b=typeof a);return b}c.extend({VERSION:"0.1.0",isArguments:function(a){return i(a,"arguments")},isArray:function(a){return i(a,"array")},copyArray:function(a){return Array.prototype.slice.call(a)},isType:i,typeOf:h,extend:function(a){var e,c,g,d;a===
+void 0&&(a={});for(e=1;e<arguments.length;e++){g=arguments[e];for(d in g)g.hasOwnProperty(d)&&(a[d]=g[d]);if(f)for(c=0;c<b.length;c++)d=b[c],g.hasOwnProperty(d)&&(a[d]=g[d])}return a},project:function(a,b){for(var c={},g=0;g<b.length;g++){var d=b[g];a&&a.hasOwnProperty(d)&&(c[d]=a[d])}return c},getFunctionName:function(a){if(typeof a=="function"){a=a.toString().match(/function\s*(\S+)\s*\(/);if(!a)return"";return a[1]}}});var j=["number","string","boolean","array","function","date","regexp","arguments",
+"undefined","null"],f=!{toString:!0}.propertyIsEnumerable("toString"),b=["toString","toLocaleString","valueOf","constructor","isPrototypeOf"]});namespace.module("org.startpad.funcs",function(c,i){function h(d){if(!d)return 0;d=d.split(".");return 1E4*parseInt(d[0])+100*parseInt(d[1])+parseInt(d[2])}function j(d,a,b,c){if(!(d._patches&&h(d._patches[a])>=h(b)))d._patches=d._patches||{},d._patches[a]=b,f(d,c)}function f(d,a){g.extend(d.prototype,a)}function b(d,a){function b(d,a){for(var c=g.copyArray(d),a=g.copyArray(a),e=0;e<c.length;e++)c[e]===void 0&&(c[e]=a.shift());return c.concat(a)}var c;c=arguments.length==3&&g.isArguments(arguments[2])?
+Array.prototype.slice.call(arguments[2],self1):Array.prototype.slice.call(arguments,2);return function(){return d.apply(a||this,b(c,arguments))}}function a(d,a){function b(){return a.call(this,d,arguments,b)}a.call(d,void 0,arguments,b);return b}function e(a){function b(){}b.prototype=a;return new b}function k(a,b,c){a.prototype=e(b.prototype);a.prototype.constructor=a;a.prototype._super=b;a.prototype._proto=b.prototype;f(a,c)}var g=i("org.startpad.types");c.extend({VERSION:"0.2.1",methods:f,bind:b,
+decorate:a,shadow:e,subclass:k,numericVersion:h,monkeyPatch:j,patch:function(){j(Function,"org.startpad.funcs",c.VERSION,{methods:function(a){f(this,a)},curry:function(){var a=[this,void 0].concat(g.copyArray(arguments));return b.apply(void 0,a)},curryThis:function(){var a=g.copyArray(arguments);a.unshift(this);return b.apply(void 0,a)},decorate:function(b){return a(this,b)},subclass:function(a,b){return k(this,a,b)}});return c}})});namespace.module("org.startpad.string",function(c,i){function h(b,a,c){c=c||f;return b=b.replace(c,function(b,c){for(var d=a,e=c.split("."),f=0;f<e.length;f++){var c=e[f],h=parseInt(c),d=isNaN(h)?d[c]:d[h];if(d==void 0)return""}return d})}var j=i("org.startpad.funcs");c.extend({VERSION:"0.1.0",patch:function(){j.monkeyPatch(String,"org.startpad.string",c.VERSION,{format:function(){return arguments.length==1&&typeof arguments[0]=="object"?h(this,arguments[0]):h(this,arguments)}});return c},format:h});
var f=/\{\s*([^} ]+)\s*\}/g});
6 namespace.js
View
@@ -5,8 +5,9 @@
(function(global) {
var globalNamespace = global['namespace'];
- var Module;
- var VERSION = '3.0.0';
+ var VERSION = '3.0.1';
+
+ function Module() {}
function numeric(s) {
if (!s) {
@@ -22,7 +23,6 @@
}
Module = globalNamespace.constructor;
} else {
- function Module () {};
global['namespace'] = globalNamespace = new Module();
}
globalNamespace['VERSION'] = VERSION;
2  namespace.min.js
View
@@ -1,2 +1,2 @@
-(function(e){function g(a){if(!a)return 0;a=a.split(".");return 1E4*parseInt(a[0])+100*parseInt(a[1])+parseInt(a[2])}function h(a){for(var a=a.replace(/-/g,"_"),a=a.split("."),b=d,c=0;c<a.length;c++)b[a[c]]===void 0&&(b[a[c]]=new f),b=b[a[c]];return b}var d=e.namespace,f;if(d){if(g("3.0.0")<=g(d.VERSION))return;f=d.constructor}else f=function(){},e.namespace=d=new f;d.VERSION="3.0.0";e=f.prototype;e.module=function(a,b){var c=h(a);b&&b(c,h);return c};e.extend=function(a){for(var b in a)a.hasOwnProperty(b)&&
+(function(e){function f(){}function g(a){if(!a)return 0;a=a.split(".");return 1E4*parseInt(a[0])+100*parseInt(a[1])+parseInt(a[2])}function h(a){for(var a=a.replace(/-/g,"_"),a=a.split("."),b=d,c=0;c<a.length;c++)b[a[c]]===void 0&&(b[a[c]]=new f),b=b[a[c]];return b}var d=e.namespace;if(d){if(g("3.0.1")<=g(d.VERSION))return;f=d.constructor}else e.namespace=d=new f;d.VERSION="3.0.1";e=f.prototype;e.module=function(a,b){var c=h(a);b&&b(c,h);return c};e.extend=function(a){for(var b in a)a.hasOwnProperty(b)&&
(this[b]=a[b])}})(this);
6 src/namespace.js
View
@@ -5,8 +5,9 @@
(function(global) {
var globalNamespace = global['namespace'];
- var Module;
- var VERSION = '3.0.0';
+ var VERSION = '3.0.1';
+
+ function Module() {}
function numeric(s) {
if (!s) {
@@ -22,7 +23,6 @@
}
Module = globalNamespace.constructor;
} else {
- function Module () {};
global['namespace'] = globalNamespace = new Module();
}
globalNamespace['VERSION'] = VERSION;
Please sign in to comment.
Something went wrong with that request. Please try again.