How to use the isExportDefaultDeclaration function from babel-types

Find comprehensive JavaScript babel-types.isExportDefaultDeclaration code examples handpicked from public code repositorys.

13
14
15
16
17
18
19
20
21
22
if (!path) {
  return path;
}

if (
  t.isExportDefaultDeclaration(path) ||
  (t.isExportNamedDeclaration(path) && path.has('declaration'))
) {
  path = path.get('declaration');
}
fork icon510
star icon3
watch icon3

30
31
32
33
34
35
36
37
38
39
},

ObjectProperty (path) {
    const parent = path.parentPath.parent;
    const name = path.node.key.name;
    if (parent && t.isExportDefaultDeclaration(parent)) {
        if (name === 'name') {
            if (t.isStringLiteral(path.node.value)) {
                state.name = path.node.value.value;
            } else {
fork icon65
star icon0
watch icon0

+ 7 other calls in file

Other functions in babel-types

Sorted by popularity

function icon

babel-types.identifier is the most popular function in babel-types (4076 examples)