示例#1
0
			ARRAY(Object.keys(spec.routes)).forEach(function(key) {
				if(is.func(modules[key])) {
					tmp[key] = modules[key](opts);
				} else if(is.obj(modules[key])) {
					tmp[key] = modules[key];
				}
			});
示例#2
0
debug.setPrefix = function(value) {
	if(!is.func(value)) {
		debug.assert(value).is('string');
	}
	debug.defaults.prefix = value;
	return debug.defaults.prefix;
};
示例#3
0
文件: api.js 项目: sendanor/nor-app
			"$use": ARRAY(funcs).map(function get_routes_map_use_funcs(func) {
				if(is.func(func)) {
					return;
				}
				if(is.obj(func) && func.hasOwnProperty('$use')) {
					return func.$use;
				}
			}).filter(function get_routes_filter_use_funcs(func) {
示例#4
0
文件: api.js 项目: sendanor/nor-app
			"$del": ARRAY(funcs).map(function get_routes_map_del_funcs(func) {
				if(is.func(func)) {
					return;
				}
				if(is.obj(func) && func.hasOwnProperty('$del')) {
					return func.$del;
				}
			}).filter(function get_routes_filter_del_funcs(func) {
示例#5
0
文件: api.js 项目: sendanor/nor-app
			"$post": ARRAY(funcs).map(function get_routes_map_post_funcs(func) {
				if(is.func(func)) {
					return;
				}
				if(is.obj(func) && func.hasOwnProperty('$post')) {
					return func.$post;
				}
			}).filter(function get_routes_filter_post_funcs(func) {
示例#6
0
文件: api.js 项目: sendanor/nor-app
			"$get": ARRAY(funcs).map(function get_routes_map_get_funcs(func) {
				if(is.func(func)) {
					return func;
				}
				if(is.obj(func) && func.hasOwnProperty('$get')) {
					return func.$get;
				}
			}).filter(function get_routes_filter_get(func) {
示例#7
0
/** Get prefix */
function get_prefix(value) {
	var has_prefix = debug.defaults.hasOwnProperty('prefix');
	if(!has_prefix) {
		return value;
	}
	var prefix = has_prefix ? debug.defaults.prefix : '';
	if(is.func(prefix)) {
		return prefix(value);
	}
	return ''+ value + ' ' + prefix;
}
示例#8
0
	str = str.replace(/(\/[^/:\)\(]+)+/gi, function(path) {
		if(FS && is.func(FS.existsSync) && FS.existsSync(path)) {
			return print_path(path);
		}
		return path;
	});
示例#9
0
文件: api.js 项目: sendanor/nor-app
			}).filter(function get_routes_filter_use_funcs(func) {
				return is.func(func);
			}).valueOf()