Skip to content

Commit 72f6c9c

Browse files
committed
refactor: drop findLastIndex, update lib to es2023
1 parent e1ce46a commit 72f6c9c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/html/parser.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* See LICENSE file in root directory for full license.
55
*/
66
import assert from "assert"
7-
import findLastIndex from "lodash/findLastIndex"
87
import type {
98
ErrorCode,
109
HasLocation,
@@ -700,8 +699,7 @@ export class Parser {
700699
protected EndTag(token: EndTag): void {
701700
debug("[html] EndTag %j", token)
702701

703-
const i = findLastIndex(
704-
this.elementStack,
702+
const i = this.elementStack.findLastIndex(
705703
(el) => el.name.toLowerCase() === token.name,
706704
)
707705
if (i === -1) {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"esModuleInterop": true,
1313
"forceConsistentCasingInFileNames": true,
1414
"inlineSources": true,
15-
"lib": ["es2015"],
15+
"lib": ["es2023"],
1616
"module": "commonjs",
1717
"moduleResolution": "node",
1818
"newLine": "LF",

0 commit comments

Comments
 (0)