How to use the isObjectProperty function from babel-types

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

167
168
169
170
171
172
173
174
175
176
  }
}

// /** @lends Foo */{ bar: ... }
if (n.isIdentifier(path.node) &&
    n.isObjectProperty(path.parentPath) &&
    n.isObjectExpression(path.parentPath.parentPath)) {
  // The @lends comment is sometimes attached to the first property rather than
  // the object expression itself.
  identifiers = findLendsIdentifiers(path.parentPath.parentPath.node) ||
fork icon510
star icon0
watch icon2

+ 11 other calls in file

55
56
57
58
59
60
61
62
63
64
plugins: [{
  visitor: {
    ExportDefaultDeclaration(path, state) {
      if(t.isObjectExpression(path.node.declaration)) {
        const props = path.node.declaration.properties
        const methodsNode = props.filter(p => t.isObjectProperty(p) && p.key.name === 'methods').shift()
        const argus = args.split(',').map(arg => t.Identifier(arg))
        const m = t.objectMethod('method', t.Identifier(name), argus, t.BlockStatement([]))
        if (methodsNode) {
          methodsNode.value.properties.push(m)
fork icon1
star icon3
watch icon2

+ 35 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)