lib/graph/transpile.js
function flagCircularDependencies(graph) {
	var includes = require("lodash/includes");
	var nodes = Array.isArray(graph) ? graph : require("lodash/values")(graph);

	for (var i = 0; i < nodes.length; i += 1) {
		var curr = nodes[i];

		for (var j = i + 1; j < nodes.length; j += 1) {
			var next = nodes[j];

			if (
				includes(curr.dependencies, next.load.name) &&
				includes(next.dependencies, curr.load.name)
			) {
				curr.load.circular = true;
				next.load.circular = true;
			}
		}
	}

	return graph;
}
function flagCircularDependencies(graph) {
	var includes = require("lodash/includes");
	var nodes = Array.isArray(graph) ? graph : require("lodash/values")(graph);

	for (var i = 0; i < nodes.length; i += 1) {
		var curr = nodes[i];

		for (var j = i + 1; j < nodes.length; j += 1) {
			var next = nodes[j];

			if (
				includes(curr.dependencies, next.load.name) &&
				includes(next.dependencies, curr.load.name)
			) {
				curr.load.circular = true;
				next.load.circular = true;
			}
		}
	}

	return graph;
}
function flagCircularDependencies ( graph ) { var includes = require ( "lodash/includes" ) ; var nodes = Array . isArray ( graph ) ? graph : require ( "lodash/values" ) ( graph ) ; for ( var i = 0 ; i < nodes . length ; i += 1 ) { var curr = nodes [ i ] ; for ( var j = i + 1 ; j < nodes . length ; j += 1 ) { var next = nodes [ j ] ; if ( includes ( curr . dependencies , next . load . name ) && includes ( next . dependencies , curr . load . name ) ) { curr . load . circular = true ; next . load . circular = true ; } } } return graph ; }
Adds a circular flag to the load object of cyclic dependencies

MUTATES THE GRAPH

@param {Object} graph - The graph to check
Adds a circular flag to the load object of cyclic dependencies