0.3.0 • Published 7 months ago

xast-util-has-attribute v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Note This repository is automatically generated from the main parser monorepo. Please submit any issues or pull requests there.

xast-util-has-attribute

npm version npm downloads

Port of hast-util-has-property for xast

Contents

What is this?

When should I use this?

Install

This package is ESM only. In Node.js (version 12.20+, 14.14+, 16.0+, 18.0+), install as

pnpm add xast-util-has-attribute
# or with yarn
# yarn add xast-util-has-attribute
# or with npm
# npm install xast-util-has-attribute

Use

API


hasAttribute()

Check if node has a set name property.

Signature

hasAttribute(node: unknown, name: string): boolean;

Parameters

NameType
nodeunknown
namestring

Returns

boolean

Defined in: lib/xast-util-has-attribute.ts:10

Syntax tree

Types

Compatibility

Security

Related

Contribute

License

MIT © Thomas F. K. Jorna

0.3.0

7 months ago

0.2.0

8 months ago

0.1.6

8 months ago

0.1.5

10 months ago

0.1.2

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.0.1

2 years ago