npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

preeti-to-unicode

v1.0.12

Published

Preeti to Unicode Nepali converter for Preeti, Kantipur, PCS Nepali, and Romanized text

Readme

preeti-to-unicode

A lightweight Nepali Unicode converter for modern web apps and Node.js tools.

Convert legacy Nepali fonts like Preeti, Kantipur, PCS Nepali, and Romanized Nepali into standard Unicode Devanagari text.


Installation

npm install preeti-to-unicode

Demo

Use PreetiUnicodeUI to quickly embed a complete Preeti-to-Unicode converter interface in your React app.

Preeti to Unicode UI Demo

If your repository uses a different image path, update the image URL accordingly.


Features

  • Converts legacy Nepali fonts into Unicode Devanagari
  • Supports:
    • Preeti
    • Kantipur
    • PCS Nepali
    • Romanized Nepali
  • Works with:
    • JavaScript
    • TypeScript
    • Node.js
    • React
  • Includes a ready-made React UI component: PreetiUnicodeUI
  • Live conversion with copy-to-clipboard support
  • Lightweight package with a simple API

Basic Usage

JavaScript (Node.js / Browser)

import { convertFont, listFonts } from 'preeti-to-unicode';

const input = 'g]kfn';
const output = convertFont(input, 'preeti');

console.log(output); // नेपाल

console.log(listFonts());
// [ 'preeti', 'kantipur', 'pcs nepali', 'romanize' ]

TypeScript

import {
  convertFont,
  getFontMeta,
  type BuiltInFontKey,
} from 'preeti-to-unicode';

const font: BuiltInFontKey = 'romanize';
const text = 'Phuldev';

const unicode = convertFont(text, font);
const meta = getFontMeta(font);

console.log(unicode); // फुलदेव
console.log(meta?.name); // Romanize

React

import { PreetiUnicodeUI } from 'preeti-to-unicode';

export default function App() {
  return (
    <PreetiUnicodeUI
      initialFont="preeti"
      initialText="g]kfn"
      theme={{
        primary: '#0f766e',
        accent: '#dc2626',
        background: '#f8fafc',
      }}
    />
  );
}

API

convertFont(text, font)

Convert legacy Nepali font text into Unicode.

Parameters

| Parameter | Type | Description | | --- | --- | --- | | text | string | Input text to convert | | font | BuiltInFontKey | Source font name |

Example

import { convertFont } from 'preeti-to-unicode';

const unicode = convertFont('g]kfn', 'preeti');

console.log(unicode); // नेपाल

listFonts()

Returns all supported font names.

Example

import { listFonts } from 'preeti-to-unicode';

console.log(listFonts());

// [ 'preeti', 'kantipur', 'pcs nepali', 'romanize' ]

getFontMeta(font)

Returns metadata for a supported font.

Example

import { getFontMeta } from 'preeti-to-unicode';

console.log(getFontMeta('kantipur'));

PreetiUnicodeUI Props

| Prop | Type | Default | Description | | --- | --- | --- | --- | | initialFont | 'preeti' \| 'kantipur' \| 'pcs nepali' \| 'romanize' | 'preeti' | Source font used for conversion | | initialText | string | '' | Initial text shown in the input textarea | | theme | Partial<ThemePalette> | {} | Theme overrides for colors and surfaces |


Notes

  1. Best results are achieved with clean text copied directly from legacy font documents.
  2. This package converts text encoding patterns, not image or PDF glyphs.
  3. React peer dependency: react >= 17
  4. Minimum supported Node.js version: 18+

Keywords

  • preeti to unicode
  • preeti unicode converter
  • nepali unicode converter
  • kantipur to unicode
  • pcs nepali to unicode
  • romanized nepali to unicode
  • nepali typing converter
  • devanagari unicode converter
  • javascript nepali converter
  • react preeti unicode

License

MIT