Plato on Github
Report Home
node_modules/wire/lib/graph/formatCycles.js
Maintainability
92.01
Lines of code
18
Difficulty
9.41
Estimated Errors
0.10
Function weight
By Complexity
By SLOC
/** @license MIT License (c) copyright B Cavalier & J Hann */ /** * formatCycles * @author: brian@hovercraftstudios.com */ (function(define) { define(function() { /** * If there are cycles, format them for output * @param {Array} cycles array of reference resolution cycles * @return {String} formatted string */ return function formatCycles(cycles) { return cycles.map(function (sc) { return '[' + sc.map(function (v) { return v.name; } ).join(', ') + ']'; }).join(', '); }; }); }(typeof define === 'function' && define.amd ? define : function(factory) { module.exports = factory(); }));