{"library":"himalaya","type":"library","category":null,"description":"Himalaya is a JavaScript library designed to synchronously parse HTML documents into a structured JSON Abstract Syntax Tree (AST) and to convert that JSON AST back into HTML. Its current stable version is 1.1.1. The library maintains a steady release cadence, with minor releases adding features like source position tracking (v1.1.0) and patch releases addressing bugs, such as issues with malformed closing tags (v1.0.1) or CSS value parsing (v0.2.13). A significant breaking change occurred in v1.0.0, which dropped the older v0 specification in favor of a new, standardized v1 AST format, making the v1 spec the default. Key differentiators include its synchronous operation, robust handling of \"weird HTML\" edge cases (like unclosed tags, extra closing tags, void/self-closing tags, doctypes, and comments), and its ability to accurately preserve whitespace from the original HTML. It also offers a `stringify` method for converting the JSON AST back to HTML, facilitating round-trip transformations. The parser explicitly does not process the content of `<script>`, `<style>`, and `<template>` tags, treating them as raw text.","language":"javascript","status":"active","version":"1.1.1","tags":["javascript","ast","html","json","parser"],"last_verified":"Wed May 27","install":[{"cmd":"npm install himalaya","imports":["import { parse } from 'himalaya'","import { stringify } from 'himalaya'","import { parseDefaults } from 'himalaya'"]},{"cmd":"yarn add himalaya","imports":[]},{"cmd":"pnpm add himalaya","imports":[]}],"homepage":null,"github":"https://github.com/andrejewski/himalaya","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/himalaya","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/himalaya/compatibility"}}