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

bytekit

v1.0.28

Published

Lightning-fast TypeScript utilities: Isomorphic API client, Async toolkit (retry, debounce, parallel), QueryClient for state management, and CLI for Swagger/OpenAPI type generation.

Downloads

2,559

Readme

bytekit

Previously known as: @sebamar88/utils (v0.1.9 and earlier)

EN: Modern TypeScript utilities: an isomorphic ApiClient, structured logging/profiling helpers, and ready-to-use modules (DateUtils, StringUtils, StorageManager, etc.).
ES: Colección moderna de utilidades TypeScript: ApiClient isomórfico, logging/profiling estructurado y helpers listos (DateUtils, StringUtils, StorageManager, etc.).

📊 Status / Estado

CI Coverage CodeQL npm version npm downloads Bundle Size License: MIT Node.js Version TypeScript PRs Welcome


✨ Highlights / Características

  • EN: Fully ESM with .d.ts definitions and tree-shakeable exports. ES: Build 100% ESM con tipos listos y exports tree-shakeable.
  • 🌐 EN: Works on Node.js 18+ and modern browsers (native fetch). ES: Compatible con Node.js 18+ y navegadores modernos (fetch nativo).
  • 🔁 EN: ApiClient with retries, circuit breaker, localized errors, and flexible options. ES: ApiClient con reintentos, circuit breaker, errores localizados y configuración flexible.
  • 🧩 EN: 28 helper modules (strings, dates, validators, env, storage, crypto, cache). ES: 28 módulos helpers (strings, fechas, validadores, env, storage, crypto, cache).
  • 🪵 EN: Structured logging/profiling: createLogger, Profiler, withTiming. ES: Logging/profiling estructurado: createLogger, Profiler, withTiming.
  • 🎯 EN: 95%+ test coverage with comprehensive test suite. ES: >95% de cobertura de tests con suite completa.
  • 📦 EN: True zero dependencies (uses native fetch). ES: Verdadero zero dependencies (usa fetch nativo).
  • EN: Optimized for performance and small bundle size. ES: Optimizado para rendimiento y tamaño mínimo.

🚀 Quick Start / Inicio Rápido

Installation / Instalación

npm install bytekit
# or / o
pnpm add bytekit
# or / o
yarn add bytekit

Global CLI Installation / Instalación CLI Global

npm install -g bytekit
# Then use / Luego usa:
sutils create users
sutils types https://api.example.com/users

Basic Usage / Uso Básico

import { ApiClient, createLogger, DateUtils, StringUtils } from "bytekit";

const http = new ApiClient({
    baseUrl: "https://api.my-service.com",
    defaultHeaders: { "X-Team": "@sebamar88" },
    locale: "es",
    errorMessages: {
        es: { 418: "Soy una tetera ☕" },
    },
});

const users = await http.get<{ id: string; name: string }[]>("/users");

const logger = createLogger({ namespace: "users-service", level: "info" });
logger.info("Users synced", { count: users.length });

const slug = StringUtils.slugify("New Users – October 2024");

Modular Imports / Importaciones Modulares

// Import specific modules to reduce bundle size
// Importa módulos específicos para reducir el tamaño del bundle

// Core modules / Módulos core
import { ApiClient } from "bytekit/api-client";
import { Logger } from "bytekit/logger";
import { RetryPolicy } from "bytekit/retry-policy";

// Helper modules / Módulos helpers
import { DateUtils } from "bytekit/date-utils";
import { StringUtils } from "bytekit/string-utils";
import { ArrayUtils } from "bytekit/array-utils";

🎯 Framework Support / Soporte de Frameworks

EN: Works seamlessly with React, Vue, Svelte, Angular, Next.js, Nuxt, SvelteKit, and more.
ES: Funciona perfectamente con React, Vue, Svelte, Angular, Next.js, Nuxt, SvelteKit y más.

React Example / Ejemplo React

import { createApiClient } from "bytekit";
import { useState, useEffect } from "react";

function Users() {
    const client = createApiClient({ baseURL: "https://api.example.com" });
    const [users, setUsers] = useState([]);

    useEffect(() => {
        client.get("/users").then(setUsers);
    }, [client]);

    return (
        <div>
            {users.map((u) => (
                <div key={u.id}>{u.name}</div>
            ))}
        </div>
    );
}

📖 View More Framework Examples →

📚 Complete Documentation / Documentación Completa

EN: For detailed documentation of all 28 modules, visit our comprehensive GitHub Wiki.
ES: Para documentación detallada de todos los 28 módulos, visita nuestra GitHub Wiki completa.

🔗 Quick Links by Category / Enlaces Rápidos por Categoría

🔧 Core Modules (9) - Essential functionality / Funcionalidad esencial

  • ApiClient - Typed HTTP client with retries, localized errors, and custom fetch support
  • Logger - Structured logger with levels, namespaces, and transports for Node/browser
  • Profiler - Performance monitoring utilities including Profiler class and withTiming wrapper
  • RetryPolicy - RetryPolicy utilities and helpers
  • ResponseValidator - ResponseValidator utilities and helpers
  • RequestCache - RequestCache utilities and helpers
  • RateLimiter - RateLimiter utilities and helpers
  • RequestDeduplicator - RequestDeduplicator utilities and helpers
  • ErrorBoundary - ErrorBoundary utilities and helpers

🛠️ Helper Modules (12) - Common utilities / Utilidades comunes

  • DateUtils - Safe date parsing, manipulation, and formatting (locale or custom tokens like YYYY-MM-DD)
  • StringUtils - Text processing: slugify, capitalize, mask, interpolate, and case conversions (pascalCase, camelCase, snakeCase, kebabCase)
  • Validator - Validation utilities for emails, phones, CUIT/CUIL, CBU, and more
  • EnvManager - EnvManager utilities and helpers
  • StorageUtils - StorageUtils utilities and helpers
  • FileUploadHelper - FileUploadHelper utilities and helpers
  • StreamingHelper - StreamingHelper utilities and helpers
  • WebSocketHelper - WebSocketHelper utilities and helpers
  • ArrayUtils - Array manipulation utilities: chunk, flatten, unique, shuffle, zip
  • ObjectUtils - Object manipulation utilities: merge, pick, omit, flatten, groupBy
  • FormUtils - FormUtils utilities and helpers
  • TimeUtils - TimeUtils utilities and helpers

⚡ Utility Modules (7) - Advanced features / Características avanzadas

🏠 Browse Full Wiki Index →

🌟 Popular Use Cases / Casos de Uso Populares

HTTP Client with Retries / Cliente HTTP con Reintentos

const api = new ApiClient({
    baseUrl: "https://api.example.com",
    retryPolicy: { maxAttempts: 3, initialDelayMs: 100 },
    circuitBreaker: { failureThreshold: 5 },
});

const users = await api.get("/users");

Structured Logging / Logging Estructurado

const logger = createLogger({ namespace: "app", level: "info" });
logger.info("User created", { userId: 123, email: "[email protected]" });

Date & String Utilities / Utilidades de Fecha y String

const formatted = DateUtils.format(new Date(), "es-AR");
const slug = StringUtils.slugify("Hello World! 🌍");
const masked = StringUtils.mask("1234567890", { start: 4, end: 2 });

Array & Object Manipulation / Manipulación de Arrays y Objetos

const chunks = ArrayUtils.chunk([1, 2, 3, 4, 5], 2); // [[1,2], [3,4], [5]]
const picked = ObjectUtils.pick(user, ["id", "name", "email"]);
const grouped = ObjectUtils.groupBy(users, "department");

🚀 Live Examples / Ejemplos en Vivo

EN: Try bytekit in your browser with these interactive examples:
ES: Prueba bytekit en tu navegador con estos ejemplos interactivos:

📁 View Local Examples →

� Documentation / Documentación

EN: Comprehensive guides to help you get the most out of bytekit:
ES: Guías completas para aprovechar al máximo bytekit:

🎮 Interactive CodeSandbox Examples

  • React Basic - ApiClient with React hooks / ApiClient con hooks de React
  • Vue Basic - Composition API integration / Integración con Composition API
  • Svelte Basic - Svelte stores integration / Integración con stores de Svelte

�🔗 Links / Enlaces

🤝 Contributing / Contribuir

EN: Contributions are welcome! Please read our contributing guidelines and feel free to submit issues and pull requests.
ES: ¡Las contribuciones son bienvenidas! Lee nuestras guías de contribución y no dudes en enviar issues y pull requests.

📄 License / Licencia

MIT © Sebastián Martinez


💡 Need help? Check the Wiki or open an issue.