UNPKG

escomplex

Version:

Software complexity analysis of JavaScript-family abstract syntax trees.

22 lines (16 loc) 408 B
/*globals require, exports */ 'use strict'; var traits = require('../traits'); exports.get = get; function get (settings) { return traits.actualise( 1, function (node) { return settings.switchcase && node.test ? 1 : 0; }, function (node) { return node.test ? 'case' : 'default'; }, undefined, [ 'test', 'consequent' ] ); }