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

skrits

v1.1.0

Published

TypeScript port of the Skrit Serbian slang text transformer (satrovacki, utrovacki, leetrovacki)

Downloads

219

Readme

SkriTS

CI npm License: GPL-3.0-or-later Coverage GitHub Stars GitHub Issues Last Commit

TypeScript port of Python skrit (v0.5.x) for Serbian slang-style text transforms:

  • satrovacki
  • utrovacki
  • leetrovacki
  • unified auto router with encode/decode detection

Also available as:

Requirements

  • Node.js >=18
  • TypeScript ^5.0 (for direct use)

Install

npm install skrits

Usage

Unified Router (encodeText)

import { encodeText } from 'skrits';

const result = encodeText('Zemun zakon matori', { mode: 'satro' });
// 'Munze konza torima'

const decoded = encodeText('Munze konza', { mode: 'auto' });
// 'Zemun zakon'

Force specific mode

import { encodeText } from 'skrits';

encodeText('bazen', { mode: 'satro' }); // 'zenba'
encodeText('bazen', { mode: 'utro' });  // 'uzenzabanje'
encodeText('bazen', { mode: 'leet', leetBase: 'satro', leetDensity: 1.0 }); // '23nb4'

Direct transformer classes

import { Satrovacki, Utrovacki, Leetrovacki } from 'skrits';

const satro = new Satrovacki();
satro.encode('Beograd'); // 'Gradbeo'
satro.decode('Gradbeo'); // 'Beograd'

const utro = new Utrovacki({ prefix: 'x', infix: 'yy', suffix: 'zz' });
utro.encode('bazen'); // 'xzenyybazz'

const leet = new Leetrovacki({ base: 'utro', leetDensity: 1.0 });
leet.encode('bazen'); // 'uzen24ban73'

Cyrillic support

import { Satrovacki } from 'skrits';

const s = new Satrovacki();
s.encode('Земун закон матори'); // 'Мунзе конза матори'
s.encode('Beograd');            // 'Gradbeo'

Leet engine

import { LeetEncoder, applyLeet, getLeetProfile } from 'skrits';

const enc = new LeetEncoder({ profile: 'basic', density: 1.0 });
enc.encode('bazen'); // '54z3n'

const mapping = getLeetProfile('full', undefined, 0);
applyLeet('hello', mapping, 0.9);

Supported Options

All options for encodeText and transformer constructors:

| Option | Values | Default | Description | |---|---|---|---| | mode | auto\|satro\|utro\|leet | auto | Transformation mode | | detectFrom | satro\|utro\|leet\|null | null | Force decode detection source | | minWordLength | number | 3 | Skip words shorter than this | | plainCTarget | ц\|ч\|ћ | ц | Cyrillic target for plain c | | softTjToCyrillic | boolean | false | Map tjћ | | exceptions | Record<string, string> | {} | Word-level overrides | | leetBase | auto\|satro\|utro | auto | Base mode for leet | | leetProfile | basic\|readable\|full | basic | Leet substitution profile | | leetComplexity | number | 0 | Variant depth for full profile | | leetDensity | 0.0–1.0 | 0.86 | Fraction of chars to substitute | | zaStyle | 24\|z4 | 24 | Utro infix leet style | | njeStyle | n73\|nj3\|њ | n73 | Utro suffix leet style | | utroPrefix | string | u | Utro prefix | | utroInfix | string | za | Utro infix | | utroSuffix | string | nje | Utro suffix |

Testing

npm test
npm run test:coverage

Tests cover:

  • satrovacki encode/decode roundtrip (Latin + Cyrillic)
  • utrovacki affix encoding and decode
  • leet profiles, density, and detection
  • leetrovacki base mode resolution and styling
  • unified router auto-detection and decode routing
  • transliteration edge cases

License

GPL-3.0-or-later

Community