# vinta/pangu.js

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vinta-pangu-js).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

4,775 stars · 310 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/vinta/pangu.js
- Homepage: https://chrome.google.com/webstore/detail/paphcfdffjnbcgkokihcdjliihicmbpd
- awesome-repositories: https://awesome-repositories.com/repository/vinta-pangu-js.md

## Topics

`chrome-extensions` `javascipt` `nodejs` `pangu` `pangu-spacing` `text-spacing` `typescript`

## Description

pangu.js is a CJK text spacing formatter and mixed-language typography validator. It functions as a JavaScript tool that inserts spaces between Chinese, Japanese, or Korean characters and alphanumeric text to improve readability.

The project provides a browser DOM text processor that injects spacing into HTML elements and a Node.js text formatting tool for processing local files and strings. It includes a typography validator to verify if text adheres to specific spacing rules between CJK characters and half-width symbols.

The tool covers core formatting and mixed language separation while preserving specialized technical terminology. It handles web page typography through dynamic content monitoring and DOM element formatting, as well as local file formatting using synchronous and asynchronous processing.

## Tags

### User Interface & Experience

- [CJK Text Formatters](https://awesome-repositories.com/f/user-interface-experience/text-formatting-utilities/cjk-text-formatters.md) — Provides specialized formatting to insert spaces between CJK characters and alphanumeric text for improved readability.
- [Mixed-Language Spacing Rules](https://awesome-repositories.com/f/user-interface-experience/container-spacing/mixed-language-spacing-rules.md) — Separates CJK characters from half-width alphanumeric characters to increase visual clarity. ([source](https://github.com/vinta/pangu.js/blob/master/HISTORY.md))
- [DOM Processors](https://awesome-repositories.com/f/user-interface-experience/text-formatting-utilities/cjk-text-formatters/dom-processors.md) — Provides a browser-based processor that injects spacing into HTML elements and monitors dynamic content changes. ([source](https://github.com/vinta/pangu.js/blob/master/HISTORY.md))
- [Reactive DOM Monitors](https://awesome-repositories.com/f/user-interface-experience/text-rendering/dom-based-rendering/reactive-dom-monitors.md) — Uses MutationObservers to reactively detect and apply CJK spacing to newly injected DOM elements.

### Development Tools & Productivity

- [Node.js Text Formatting Libraries](https://awesome-repositories.com/f/development-tools-productivity/node-js-text-formatting-libraries.md) — Offers a Node.js library for processing local files and strings to ensure consistent mixed-language spacing.
- [Local File Processing Tools](https://awesome-repositories.com/f/development-tools-productivity/local-file-processing-tools.md) — Formats local files by adding spaces between CJK and alphanumeric characters using sync or async I/O. ([source](https://github.com/vinta/pangu.js/blob/master/HISTORY.md))

### Testing & Quality Assurance

- [Mixed-Language Typography Validators](https://awesome-repositories.com/f/testing-quality-assurance/mixed-language-typography-validators.md) — Provides a utility to verify if text strings adhere to specific spacing rules between CJK characters and symbols.
- [Typographic Spacing Validators](https://awesome-repositories.com/f/testing-quality-assurance/typographic-spacing-validators.md) — Includes a validator to verify if strings or files adhere to required CJK and alphanumeric spacing rules.
- [Typographic Spacing Verifiers](https://awesome-repositories.com/f/testing-quality-assurance/typographic-spacing-verifiers.md) — Checks if a string or file contains the correct spacing between CJK and alphanumeric characters. ([source](https://github.com/vinta/pangu.js/blob/master/README.md))

### Web Development

- [DOM Text Processors](https://awesome-repositories.com/f/web-development/dom-text-processors.md) — Provides a browser-side processor that injects spacing into HTML elements and monitors dynamic content.
- [Mixed-Script Regex Separators](https://awesome-repositories.com/f/web-development/mixed-script-regex-separators.md) — Employs regular expressions to identify boundaries between CJK and alphanumeric characters for automatic whitespace insertion.
- [DOM Element Manipulators](https://awesome-repositories.com/f/web-development/dom-element-manipulators.md) — Programmatically modifies the content of HTML elements to inject typographic spacing. ([source](https://github.com/vinta/pangu.js/blob/master/README.md))
- [Typography Content Observers](https://awesome-repositories.com/f/web-development/dynamic-content-loading/dynamic-element-observation/typography-content-observers.md) — Automatically monitors the web page for new elements to apply CJK spacing rules dynamically.

### Artificial Intelligence & ML

- [Technical Terminology Preservation](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/language-model-integrations/translation-services/document-translators/technical-terminology-preservation.md) — Preserves specialized technical terminology to prevent incorrect space insertion within compound technical words.

### Part of an Awesome List

- [CJK Spacing Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/web-typography-utilities/cjk-spacing-utilities.md) — Implements web-specific typography by inserting whitespace into DOM elements to separate CJK scripts from Latin text.

### Scientific & Mathematical Computing

- [DOM Tree Traversers](https://awesome-repositories.com/f/scientific-mathematical-computing/recursive-tree-traversal-algorithms/dom-tree-traversers.md) — Recursively traverses the HTML DOM tree to find and modify text nodes for typography formatting.

### System Administration & Monitoring

- [Web Change Monitors](https://awesome-repositories.com/f/system-administration-monitoring/web-change-monitors.md) — Monitors changes to web page content to automatically apply spacing to newly added text elements. ([source](https://github.com/vinta/pangu.js/blob/master/TODO.md))
