Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-jsx-utils

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-jsx-utils - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

4

dist/index.d.ts

@@ -10,6 +10,6 @@ import { JSXAttribute, JSXIdentifier, JSXNamespacedName, JSXOpeningElement } from "@babel/types";

* @param nodePath The NodePath of the JSX opening element
* @param onError Called with the attribute name if it is present but cannot be resolved
* @param onError Called with the attribute name and path if it is present but cannot be resolved
* @param include If present, only these props are evaluated. Does not apply to spread attributes.
*/
export declare function getAttributeValues(nodePath: CoreNodePath<JSXOpeningElement> | TraverseNodePath<JSXOpeningElement>, onError?: (attributeName: string) => void, include?: Set<string>): Record<string, unknown>;
export declare function getAttributeValues(nodePath: CoreNodePath<JSXOpeningElement> | TraverseNodePath<JSXOpeningElement>, onError?: (attributeName: string, attributePath?: CoreNodePath<JSXAttribute>) => void, include?: Set<string>): Record<string, unknown>;
/**

@@ -16,0 +16,0 @@ * Attempt to get the value of a JSX attribute. Returns an object with the

@@ -13,3 +13,3 @@ function parseIdentifier(identifier) {

* @param nodePath The NodePath of the JSX opening element
* @param onError Called with the attribute name if it is present but cannot be resolved
* @param onError Called with the attribute name and path if it is present but cannot be resolved
* @param include If present, only these props are evaluated. Does not apply to spread attributes.

@@ -48,3 +48,3 @@ */

} else {
onError == null ? void 0 : onError(prop);
onError == null ? void 0 : onError(prop, attrPath);
}

@@ -51,0 +51,0 @@ }

@@ -13,3 +13,3 @@ function parseIdentifier(identifier) {

* @param nodePath The NodePath of the JSX opening element
* @param onError Called with the attribute name if it is present but cannot be resolved
* @param onError Called with the attribute name and path if it is present but cannot be resolved
* @param include If present, only these props are evaluated. Does not apply to spread attributes.

@@ -48,3 +48,3 @@ */

} else {
onError == null ? void 0 : onError(prop);
onError == null ? void 0 : onError(prop, attrPath);
}

@@ -51,0 +51,0 @@ }

@@ -13,3 +13,3 @@ function parseIdentifier(identifier) {

* @param nodePath The NodePath of the JSX opening element
* @param onError Called with the attribute name if it is present but cannot be resolved
* @param onError Called with the attribute name and path if it is present but cannot be resolved
* @param include If present, only these props are evaluated. Does not apply to spread attributes.

@@ -48,3 +48,3 @@ */

} else {
onError?.(prop);
onError?.(prop, attrPath);
}

@@ -51,0 +51,0 @@ }

@@ -18,3 +18,3 @@ (function (global, factory) {

* @param nodePath The NodePath of the JSX opening element
* @param onError Called with the attribute name if it is present but cannot be resolved
* @param onError Called with the attribute name and path if it is present but cannot be resolved
* @param include If present, only these props are evaluated. Does not apply to spread attributes.

@@ -53,3 +53,3 @@ */

} else {
onError == null ? void 0 : onError(prop);
onError == null ? void 0 : onError(prop, attrPath);
}

@@ -56,0 +56,0 @@ }

{
"name": "babel-jsx-utils",
"version": "1.0.1",
"version": "1.1.0",
"description": "Utilities for working with Babel and JSX",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -47,2 +47,15 @@ # babel-jsx-utils

## Installation
Install:
```shell
yarn install babel-jsx-utils
```
or
```shell
npm install babel-jsx-utils
```
## Usage

@@ -49,0 +62,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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