I tried to use this library to analyze a copy of the popular classnames library - I think this is classnames 2.2.6
// classnames.js
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
'use strict';
var hasOwn = {}.hasOwnProperty;
function classNames() {
var classes = [];
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (!arg)
continue;
var argType = typeof arg;
if (argType === 'string' || argType === 'number') {
classes.push(arg);
}
else if (Array.isArray(arg) && arg.length) {
var inner = classNames.apply(null, arg);
if (inner) {
classes.push(inner);
}
}
else if (argType === 'object') {
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes.push(key);
}
}
}
}
return classes.join(' ');
}
if (typeof module !== 'undefined' && module.exports) {
classNames.default = classNames;
module.exports = classNames;
}
else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
// register as 'classnames', consistent with npm package name
define('classnames', [], function () {
return classNames;
});
}
else {
window.classNames = classNames;
}
}());
//# sourceMappingURL=classnames.js.map
/home/dgoldstein/src/server/node_modules/analyse-control/basic_control.js:648
throw new Error("No specific rules for given " + input.type);
^
Error: No specific rules for given VariableDeclarator
at flowProgram.otherwise.then (/home/dgoldstein/src/server/node_modules/analyse-control/basic_control.js:648:11)
at morphicFunction (/home/dgoldstein/src/server/node_modules/morphic/morphic.js:60:19)
at nodeList.flatMap (/home/dgoldstein/src/server/node_modules/analyse-control/basic_control.js:653:37)
at /home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:3433:45
at /home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:3016:46
at /home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:2867:56
at List.__iterate (/home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:2206:13)
at ToIndexedSequence.__iterate (/home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:2867:25)
at IndexedIterable.mappedSequence.__iterateUncached (/home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:3015:23)
at seqIterate (/home/dgoldstein/src/server/node_modules/immutable/dist/immutable.js:604:16)
I have no idea where to go from here as the error message is rather unhelpful and a quick glance at the code didn't help me undestand much of anything.