/
drndsv
/
react
Обзор
Документация
Войти
/
drndsv
/
react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/eslint-plugin-react/lib/util/getTokenBeforeClosingBracket.js
16 строк
428 B
drndsv
Initial commit
14 апр 2025, 22:53
14 апр 2025, 22:53
641ac8a
Код
Авторство
О чём код?
'use strict'; /** * Find the token before the closing bracket. * @param {ASTNode} node - The JSX element node. * @returns {Token} The token before the closing bracket. */ function getTokenBeforeClosingBracket(node) { const attributes = node.attributes; if (!attributes || attributes.length === 0) { return node.name; } return attributes[attributes.length - 1]; } module.exports = getTokenBeforeClosingBracket;