Wondering what’s next for npm?Check out our public roadmap! »

    @myanmartools/ng-zawgyi-detector
    TypeScript icon, indicating that this package has built-in type declarations

    1.2.6 • Public • Published

    Zawgyi and Standard Myanmar Unicode Detector for Angular

    GitHub Actions Status Azure Pipelines Status codecov npm version Gitter

    Zawgyi-One and standard Myanmar Unicode detector library for Angular applications.

    Features

    • Accurate & performance optimized detection for both Zawgyi-One (ဇော်ဂျီ) and standard Myanmar Unicode (မြန်မာ ယူနီကုဒ်)
    • Intelligent chunk by chunk detection on mix-typed input (Mixed Zawgyi and Unicode)
    • Fully tested with Myanmar Spelling Book (မြန်မာ စာလုံးပေါင်း သတ်ပုံကျမ်း) data
    • Deep detection on A That (အသက်), Pahsin (ပါဌ်ဆင့်), Kinsi (ကင်းစီး), etc.
    • Work with latest version of Angular
    • Compatible with Angular Universal (Node.js Server Side Rendering - SSR)
    • Open source and MIT license!

    Get Started

    Installation

    npm

    npm install @myanmartools/ng-zawgyi-detector

    or yarn

    yarn add @myanmartools/ng-zawgyi-detector

    Module Setup (app.module.ts)

    import { ZawgyiDetectorModule } from '@myanmartools/ng-zawgyi-detector';
    
    @NgModule({
      imports: [
        // Other module imports
    
        // ng-zawgyi-detector module
        ZawgyiDetectorModule
      ]
    })
    export class AppModule { }

    Live edit app.module.ts in stackblitz

    Usage (app.component.ts)

    import { Component } from '@angular/core';
    
    import { ZawgyiDetector } from '@myanmartools/ng-zawgyi-detector';
    
    @Component({
      selector: 'app-root',
      templateUrl: './app.component.html'
    })
    export class AppComponent {
      constructor(private readonly _zawgyiDetector: ZawgyiDetector) {
        const result = this._zawgyiDetector.detect('ျမန္မာစာ');
          if (result.detectedEnc === 'zg') {
              console.log('ZAWGYI DETECTED');
          } else if (result.detectedEnc === 'uni') {
              console.log('UNICODE DETECTED');
          }
      }
    }

    Live edit app.component.ts in stackblitz

    Samples

    Demo app view source / live edit in stackblitz

    Live Application

    Zawgyi Unicode Converter - Angular PWA

    Build & Test Tools

    We use lib-tools for bundling, testing and packaging our library projects.

    Lib Tools

    Feedback and Contributing

    Check out the Contributing page.

    License

    This repository is licensed with the MIT license.

    Install

    npm i @myanmartools/ng-zawgyi-detector

    DownloadsWeekly Downloads

    1,276

    Version

    1.2.6

    License

    MIT

    Unpacked Size

    1.06 MB

    Total Files

    31

    Last publish

    Collaborators

    • avatar
    • avatar