demos/requirejs/bower_components/requirejs/require.js
Function newContext
has 934 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function newContext(contextName) {
var inCheckLoaded, Module, context, handlers,
checkLoadedTimeoutId,
config = {
//Defaults. Do not set a default for map
- Create a ticketCreate a ticket
File require.js
has 1249 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/** vim: et:ts=4:sw=4:sts=4
* @license RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/requirejs for details
*/
- Create a ticketCreate a ticket
Function callPlugin
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
callPlugin: function () {
var map = this.map,
id = map.id,
//Map already normalized the prefix.
pluginMap = makeModuleMap(map.prefix);
- Create a ticketCreate a ticket
Function makeRequire
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
makeRequire: function (relMap, options) {
options = options || {};
function localRequire(deps, callback, errback) {
var id, map, requireMod;
- Create a ticketCreate a ticket
Function configure
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
configure: function (cfg) {
//Make sure the baseUrl ends in a slash.
if (cfg.baseUrl) {
if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
cfg.baseUrl += '/';
- Create a ticketCreate a ticket
Function check
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
check: function () {
if (!this.enabled || this.enabling) {
return;
}
- Create a ticketCreate a ticket
Function checkLoaded
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function checkLoaded() {
var err, usingPathFallback,
waitInterval = config.waitSeconds * 1000,
//It is possible to disable the wait interval by using waitSeconds of 0.
expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
- Create a ticketCreate a ticket
Function makeModuleMap
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
var url, pluginModule, suffix, nameParts,
prefix = null,
parentName = parentModuleMap ? parentModuleMap.name : null,
originalName = name,
- Create a ticketCreate a ticket
Function normalize
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function normalize(name, baseName, applyMap) {
var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
baseParts = (baseName && baseName.split('/')),
map = config.map,
- Create a ticketCreate a ticket
Function enable
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
enable: function () {
enabledRegistry[this.map.id] = this;
this.enabled = true;
//Set flag mentioning that the module is enabling,
- Create a ticketCreate a ticket
Function load
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
req.load = function (context, moduleName, url) {
var config = (context && context.config) || {},
node;
if (isBrowser) {
//In the browser so use a script tag
- Create a ticketCreate a ticket
Function localRequire
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function localRequire(deps, callback, errback) {
var id, map, requireMod;
if (options.enableBuildCallback && callback && isFunction(callback)) {
callback.__requireJsBuild = true;
- Create a ticketCreate a ticket
Function nameToUrl
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
nameToUrl: function (moduleName, ext, skipExt) {
var paths, syms, i, parentModule, url,
parentPath, bundleId,
pkgMain = getOwn(config.pkgs, moduleName);
- Create a ticketCreate a ticket
Function completeLoad
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
completeLoad: function (moduleName) {
var found, args, mod,
shim = getOwn(config.shim, moduleName) || {},
shExports = shim.exports;
- Create a ticketCreate a ticket
Function fromText
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load.fromText = bind(this, function (text, textAlt) {
/*jslint evil: true */
var moduleName = map.name,
moduleMap = makeModuleMap(moduleName),
hasInteractive = useInteractive;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (mapValue) {
mapValue = getOwn(mapValue, nameSegment);
if (mapValue) {
//Match, update name to the new value.
foundMap = mapValue;
- Create a ticketCreate a ticket
Avoid deeply nested control flow statements. Open
Open
if (cjsModule) {
exports = cjsModule.exports;
} else if (this.usingExports) {
//exports already set the defined value.
exports = this.exports;
- Create a ticketCreate a ticket
Consider simplifying this complex logical expression. Open
Open
if (deepStringMixin && typeof value === 'object' && value &&
!isArray(value) && !isFunction(value) &&
!(value instanceof RegExp)) {
if (!target[prop]) {
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return localRequire;
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return defined[id];
- Create a ticketCreate a ticket