Commit 797d9a8
tools: refactor json.js
* Simplify regular expressions (see below)
* Remove unneeded `parseYAML()` wrapper
* Remove unused callback argument
Regular expression simplifications include:
* Changing trailing `*?$/` to `*$/` because non-greedy matching to the
end of a line will not change behavior
* Change regexp beginnings like `/^(?:property:?\s*)?[^.\[]+` to the
equivalent `/[^.\]]+`
* For regular expressions changed per the above, remove
case-insensitivity if it no longer affects the regexp
PR-URL: #10442
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>1 parent 04d82a5 commit 797d9a8
1 file changed
+8
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | 305 | | |
310 | 306 | | |
311 | 307 | | |
| |||
314 | 310 | | |
315 | 311 | | |
316 | 312 | | |
317 | | - | |
| 313 | + | |
318 | 314 | | |
319 | 315 | | |
320 | 316 | | |
| |||
544 | 540 | | |
545 | 541 | | |
546 | 542 | | |
547 | | - | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
555 | 549 | | |
556 | 550 | | |
557 | 551 | | |
| |||
0 commit comments