( prop: t.ObjectProperty, )
| 23 | ] |
| 24 | |
| 25 | export function getObjectPropertyKeyName( |
| 26 | prop: t.ObjectProperty, |
| 27 | ): string | undefined { |
| 28 | if (prop.computed) { |
| 29 | return undefined |
| 30 | } |
| 31 | |
| 32 | if (t.isIdentifier(prop.key)) { |
| 33 | return prop.key.name |
| 34 | } |
| 35 | |
| 36 | if (t.isStringLiteral(prop.key)) { |
| 37 | return prop.key.value |
| 38 | } |
| 39 | |
| 40 | return undefined |
| 41 | } |
| 42 | |
| 43 | export function getUniqueProgramIdentifier( |
| 44 | programPath: babel.NodePath<t.Program>, |
no outgoing calls
no test coverage detected