pangu
Version:
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
14 lines (10 loc) • 381 B
text/typescript
import pangu, { BrowserPangu } from './pangu.js';
// The UMD global carries the class as a property of the instance, so `window.pangu.BrowserPangu` stays constructible for <script> consumers
const panguUmd = Object.assign(pangu, { BrowserPangu });
// Declare global for UMD builds
declare global {
interface Window {
pangu: typeof panguUmd;
}
}
export default panguUmd;