Socket
Socket
Sign inDemoInstall

babel-types

Package Overview
Dependencies
Maintainers
6
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-types - npm Package Compare versions

Comparing version 6.20.0 to 6.21.0

12

lib/definitions/jsx.js

@@ -46,3 +46,3 @@ "use strict";

children: {
validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXElement")))
validate: (0, _index.chain)((0, _index.assertValueType)("array"), (0, _index.assertEach)((0, _index.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement")))
}

@@ -66,2 +66,12 @@ }

(0, _index2.default)("JSXSpreadChild", {
visitor: ["expression"],
aliases: ["JSX", "Immutable"],
fields: {
expression: {
validate: (0, _index.assertNodeType)("Expression")
}
}
});
(0, _index2.default)("JSXIdentifier", {

@@ -68,0 +78,0 @@ builder: ["name"],

2

package.json
{
"name": "babel-types",
"version": "6.20.0",
"version": "6.21.0",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",

@@ -5,0 +5,0 @@ "author": "Sebastian McKenzie <sebmck@gmail.com>",

@@ -870,2 +870,14 @@ # babel-types

### import
```javascript
t.import()
```
See also `t.isImport(node, opts)` and `t.assertImport(node, opts)`.
Aliases: `Expression`
---
### importDeclaration

@@ -1006,3 +1018,3 @@ ```javascript

- `closingElement`: `JSXClosingElement` (default: `null`)
- `children`: `Array<JSXText | JSXExpressionContainer | JSXElement>` (required)
- `children`: `Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement>` (required)
- `selfClosing` (required)

@@ -1106,2 +1118,15 @@

### jSXSpreadChild
```javascript
t.jSXSpreadChild(expression)
```
See also `t.isJSXSpreadChild(node, opts)` and `t.assertJSXSpreadChild(node, opts)`.
Aliases: `JSX`, `Immutable`
- `expression`: `Expression` (required)
---
### jSXText

@@ -1108,0 +1133,0 @@ ```javascript

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc