Note This repository is automatically generated from the main parser monorepo. Please submit any issues or pull requests there.
Port of hast-util-has-property for xast
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
Check if node
has a set name
property.
hasAttribute(node: unknown, name: string): boolean;
Name | Type |
---|---|
node |
unknown |
name |
string |
boolean
Defined in: lib/xast-util-has-attribute.ts:10
MIT © Thomas F. K. Jorna