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

@frankfmy/core

v1.1.1

Published

Фундаментальные TypeScript утилиты: даты, деньги, строки, телефоны, валидация ИНН/ОГРН, хэширование

Downloads

129

Readme

@frankfmy/core

Universal utilities for frontend and backend

Installation

bun add @frankfmy/core

Features

Date Utilities

import { formatDateRU, formatRelativeTime, isBusinessDay } from '@frankfmy/core';

formatDateRU(new Date()); // "03.12.2025"
formatDateRU(new Date(), 'dd MMMM yyyy'); // "03 декабря 2025"
formatRelativeTime(new Date(Date.now() - 3600000)); // "около 1 часа назад"
isBusinessDay(new Date()); // true/false

Money Utilities

import { formatMoneyRU, calcVAT } from '@frankfmy/core';

formatMoneyRU(1234.56); // "1 234,56 ₽"
formatMoneyRU(1234.56, 'USD', 'en-US'); // "$1,234.56"

// VAT calculation
calcVAT(100, 20); // { amount: 100, vat: 20, total: 120 }
calcVAT(120, 20, true); // inclusive: { amount: 100, vat: 20, total: 120 }

String Utilities

import { pluralize, slugify, truncate, maskString } from '@frankfmy/core';

pluralize(1, ['товар', 'товара', 'товаров']); // "товар"
pluralize(3, ['товар', 'товара', 'товаров']); // "товара"
pluralize(5, ['товар', 'товара', 'товаров']); // "товаров"

slugify('Привет Мир!'); // "privet-mir"
truncate('Long text...', 10); // "Long te..."
maskString('1234567890', 4, 8); // "1234****90"

Phone Utilities

import { cleanPhone, formatPhoneRU, validatePhoneRU } from '@frankfmy/core';

cleanPhone('+7 (916) 123-45-67'); // "79161234567"
formatPhoneRU('79161234567'); // "+7 (916) 123-45-67"
validatePhoneRU('+79161234567'); // true

Business Validation (Russia)

import { validateINN, validateOGRN, validateKPP, validateSNILS } from '@frankfmy/core';

validateINN('7707083893'); // true (10 digits - organization)
validateINN('500100732259'); // true (12 digits - individual)
validateOGRN('1027700132195'); // true
validateKPP('770701001'); // true
validateSNILS('11223344595'); // true

Crypto Utilities

import { hashPassword, generateToken } from '@frankfmy/core';

const hash = await hashPassword('password123'); // Bcrypt hash
const token = generateToken(32); // nanoid token

Array Utilities

import { groupBy, chunk, debounce, throttle } from '@frankfmy/core';

const users = [
  { id: 1, role: 'admin' },
  { id: 2, role: 'user' },
  { id: 3, role: 'admin' }
];

groupBy(users, 'role');
// { admin: [...], user: [...] }

chunk([1, 2, 3, 4, 5], 2);
// [[1, 2], [3, 4], [5]]

const debouncedFn = debounce(search, 300);
const throttledFn = throttle(scroll, 100);

Types

import type { Result, ApiResponse, UserRole } from '@frankfmy/core';

// Result type for error handling
type Result<T, E> = { success: true; value: T } | { success: false; error: E };

// API Response type
interface ApiResponse<T> {
  success: boolean;
  data?: T;
  error?: string;
  statusCode?: number;
}

License

PolyForm Shield 1.0.0 — © 2025 Artyom Pryanishnikov