diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js index 60877338..5c0e02f0 100644 --- a/lib/cloudfunc.js +++ b/lib/cloudfunc.js @@ -3,15 +3,13 @@ var Util; (function(scope, Util) { 'use strict'; - var check, rendy; + var rendy; if (typeof module === 'object' && module.exports) { - check = require('checkup'); rendy = require('rendy'); module.exports = new CloudFuncProto(Util); } else { - check = Util.check; rendy = Util.render; scope.CloudFunc = new CloudFuncProto(Util); } @@ -91,8 +89,8 @@ var Util; this.rmLastSlash = function(path) { var length, lastSlash, isEqual; - check(arguments, ['path']) - .type('path', path, 'string'); + if (typeof path !== 'string') + throw(Error('path should be a string!')); length = path.length - 1; lastSlash = path.lastIndexOf('/'); @@ -124,7 +122,11 @@ var Util; pathHTML = '', path = '/'; - check(arguments, ['url', 'template']); + if (!url) + throw(Error('url could not be empty!')); + + if (!template) + throw(Error('template could not be empty!')); namesRaw = url.split('/') .slice(1, -1), diff --git a/package.json b/package.json index 31aacbc0..5e5b6ae7 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,6 @@ "subdomain": "cloudcmd", "dependencies": { "ashify": "~1.0.0", - "checkup": "~1.0.2", "console-io": "~2.1.0", "edward": "~1.1.0", "execon": "~1.1.0",