Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pixiedevpraveen/tagbalancer
Balance tags of html string
https://github.com/pixiedevpraveen/tagbalancer
Last synced: about 1 month 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 (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-10-29T17:07:26.000Z (about 2 months ago)
- Last Synced: 2024-10-29T18:31:58.600Z (about 2 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
![Package Size](https://deno.bundlejs.com/badge?q=tag-balancer)
[![JSR](https://jsr.io/badges/@praveen/tag-balancer)](https://jsr.io/@praveen/tag-balancer)
[![JSR Score](https://jsr.io/badges/@praveen/tag-balancer/score)](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); /*
*/```