react-carousel-query
Version:
A infinite carousel component made with react that handles the pagination for you.
29 lines (24 loc) • 583 B
JavaScript
const {declare} = require('@babel/helper-plugin-utils')
class BabelPluginExtractImportNames {
constructor() {
const names = []
this.state = {names}
this.plugin = declare(api => {
api.assertVersion(7)
return {
visitor: {
ImportDeclaration(path) {
path.traverse({
Identifier(path) {
if (path.key === 'local') {
names.push(path.node.name)
}
}
})
}
}
}
})
}
}
module.exports = BabelPluginExtractImportNames