UNPKG

jscodeshaft

Version:

Collection of more or less primitive helpers and abstractions for JSCodeShift, build for design system migrations and upgrades.

12 lines (11 loc) 306 B
/** * Find an import specifier matching the module in question * @param {Node} importNode * @returns {Boolean} */ export const hasFragment = (importNode) => importNode.specifiers.some( specifier => ( specifier.type === 'ImportSpecifier' && specifier.imported.name === 'Fragment' ), );