https://github.com/pixiedevpraveen/tagbalancer
Balance tags of html string
https://github.com/pixiedevpraveen/tagbalancer
Last synced: 4 months ago
JSON representation
Balance tags of html string
- Host: GitHub
- URL: https://github.com/pixiedevpraveen/tagbalancer
- Owner: pixiedevpraveen
- License: mit
- Created: 2024-10-29T16:57:05.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-10-29T17:07:26.000Z (8 months ago)
- Last Synced: 2025-01-14T02:13:55.095Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tag-balancer

[](https://jsr.io/@praveen/tag-balancer)
[](https://jsr.io/@praveen/tag-balancer/score)Balance tags of html string.
To install:
```bash
# npm
npm install tag-balancer# bun
bun add tag-balancer# yarn
yarn add tag-balancer# pnpm
pnpm add tag-balancer
```## Example
```ts
const htmlStr = `
![]()
`;// removes the extra closing div
const outputStr = tagBalancer(htmlStr); /*
![]()
*/```