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

@randstad-uca/apret-response-messages

v1.0.13

Published

Biblioteca de mensajes de APRET multilenguaje para respuestas estandarizadas.

Readme

📚 Librería de APRET Mensajes Multilenguaje

Una librería ligera y escalable para gestionar mensajes de error en múltiples idiomas. Ideal para proyectos Node.js con TypeScript.

🧩 Características

  • ✅ Soporte multilenguaje (ej: español, inglés).
  • ✅ Archivos JSON separados por idioma.
  • ✅ Fácil de mantener y expandir.
  • ✅ Uso simple desde cualquier parte del proyecto.
  • ✅ Compatible con sistemas offline (si se usa con .tgz o archivos locales).

##🛠️ Instalación

npm install @randstad-uca/apret-response-messages

#📁 Estructura del Proyecto

apret-response-messages/
├── src/
│   ├── index.ts            - Funciones principales
│   ├── messages/
│   │   ├── es.json         - Mensajes en español
│   │   ├── en.json         - Mensajes en inglés
│   │   └── message.ts
│   └── types.ts            - Tipos y interfaces
├── dist/                   - Código compilado (build)
├── package.json
├── README.md
└── tsconfig.json

📦 Uso de la Librería

import { getMessageResponse } from '@randstad-uca/apret-response-messages';
const message = getMessageResponse(102, 1); // Mensaje 102 en español
console.log(message);
// Salida: { code: 102, message: 'el DNI ingresado ya se encuentra registrado.' }
const message = getMessageResponse(102, 2); // Mensaje 102 en inglés
console.log(message);
// Salida: { code: 102, message: 'the entered DNI is already registered.' }

##🌍 Agregar más idiomas

  1. Añade un nuevo archivo JSON en /src/messages/, ej: fr.json.

  2. Actualiza el mapa de idiomas en src/messages/index.ts.

// src/messages/message.ts

import { LangCode } from '../types';

const langMap: Record<LangCode, any> = {
  1: require('./es.json'),
  2: require('./en.json'),
  3: require('./fr.json'), // Nuevo idioma
};
  1. Extiende el tipo LangCode en src/types.ts:
// src/types.ts

export type LangCode = 1 | 2 | 3; 

##🔨 Construir el proyecto

npm run build
  • Esto genera los archivos compilados en la carpeta dist/.

##📦 Empaquetar para distribución

npm run pack
  • Genera un archivo .tgz que puedes compartir o instalar sin conexión.

##🧪 Ejecutar directamente

npm run dev
  • Corre el archivo en modo desarrollo con ts-node.