src/utils/getSpecImport.js
function getSpecifierIdentifiers(specifiers = [], withPath = false) {
  const collection = [];
  function loop(path, index) {
    const node = path.node
    const item = !withPath ? node.local.name : { path, name: node.local.name }
    switch (node.type) {
      case 'ImportDefaultSpecifier':
      case 'ImportSpecifier':
      case 'ImportNamespaceSpecifier':
        collection.push(item);
        break;
    }
  }
  specifiers.forEach(loop);

  return collection;
}
function getSpecifierIdentifiers(specifiers = [], withPath = false) {
  const collection = [];
  function loop(path, index) {
    const node = path.node
    const item = !withPath ? node.local.name : { path, name: node.local.name }
    switch (node.type) {
      case 'ImportDefaultSpecifier':
      case 'ImportSpecifier':
      case 'ImportNamespaceSpecifier':
        collection.push(item);
        break;
    }
  }
  specifiers.forEach(loop);

  return collection;
}
function getSpecifierIdentifiers ( specifiers = [ ] , withPath = false ) { const collection = [ ] ; function loop ( path , index ) { const node = path . node const item = ! withPath ? node . local . name : { path , name : node . local . name } switch ( node . type ) { case 'ImportDefaultSpecifier' : case 'ImportSpecifier' : case 'ImportNamespaceSpecifier' : collection . push ( item ) ; break ; } } specifiers . forEach ( loop ) ; return collection ; }
get identifiers from the code, as follows

input:  `import { b, c } from 'a'`
output: ['b', 'c']

input:  `import a from 'a'`
output: ['a']
get identifiers from the code as follows