UNPKG

dgeni-packages

Version:

A collection of dgeni packages for generating documentation from source code

14 lines (13 loc) 395 B
/** * @dgService ImportDeclarationNodeMatcher * @description Creates code name matcher for AST entry */ module.exports = function ImportDeclarationNodeMatcherFactory () { /** * @param {Node} node AST node to process * @returns {String|Null} code name from node */ return function ImportDeclarationNodeMatcher (node) { return node.source && node.source.value || null; }; };