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 🙏

© 2025 – Pkg Stats / Ryan Hefner

reezutils

v0.5.1

Published

Un módulo creado para facilitar algunas funciones como por ejemplo obtener un elemento aleatorio de un array o obtener la fecha en otros idiomas.

Readme

reezutils

reezutils es un módulo creado para facilitar algunas funciones como por ejemplo obtener un elemento aleatorio de un array.

Tabla de navegación:

Instalación:

npm i reezutils --save

Funciones disponibles:

Cambios:

v.0.5b:

v.0.3a:

v.0.2a:

  • Corregidas algunas pequeñas faltas ortográficas en el archivo README.md.

v.0.1a:

Uso de las funciones:

elementoAleatorio()

elementoAleatorio() te permite obtener un elemento aleatorio de un array.

Ejemplo:

//Importa el módulo reezutils.
const reezutils = require('reezutils');

//Crea el array 'numeros'.
let numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

//Hace un console.log() de la función elementoAleatorio() para obtener un elemento aleatorio del array 'numeros'.
console.log(reezutils.elementoAleatorio(numeros)); //Elemento aleatorio.

aleatorioEntre()

aleatorioEntre() te permite obtener un número entre dos números.

Ejemplo:

//Importa el módulo reezutils.
const reezutils = require('reezutils');

//Hace un console.log() de la función aleatorioEntre() para obtener un número aleatorio entre 100 y 999.
console.log(reezutils.aleatorioEntre(100, 999)); //Número aleatorio.

obtenerFecha()

obtenerFecha() te permite obtener la fecha de un timestamp en español o en inglés.

Ejemplo:

//Importa el módulo reezutils.
const reezutils = require('reezutils');

//Hace dos console.log() de la función obtenerFecha() para obtener la fecha en español y en inglés del timestamp del creado de mi cuenta. Pero para esto necesitamos un formato, los formatos más usados son:

//Español: dddd Do [de] MMMM [del] YYYY [a las] h:mm:ss A - Viernes 31º de Mayo del 2019 a las 10:36:16 PM - 'es'
//Inglés: MMMM Do dddd [of] YYYY [at] h:mm:ss A - May 31st Friday of 2019 at 10:36:16 PM - 'en'

console.log(reezutils.obtenerFecha(message.author.createdTimestamp, 'es', 'dddd Do [de] MMMM [del] YYYY [a las] h:mm:ss A')); //Fecha en español.
console.log(reezutils.obtenerFecha(message.author.createdTimestamp, 'en', 'MMMM Do dddd [of] YYYY [at] h:mm:ss A')); //Fecha en inglés.

fechaActual()

fechaActual() te permite obtener la fecha actual en español o en inglés.

Ejemplo:

//Importa el módulo reezutils.
const reezutils = require('reezutils');

//Hace dos console.log() de la función fechaActual() para obtener la fecha actual en español y en inglés. Para esto necesitamos un formato, los formatos más usados son:

//Español: dddd Do [de] MMMM [del] YYYY [a las] h:mm:ss A - Jueves 28 de Mayo del 2020 a las 1:35:49 PM  - 'es'
//Inglés: MMMM Do dddd [of] YYYY [at] h:mm:ss A - May 28th Thursday of 2020 at 1:43:31 PM - 'en'

console.log(reezutils.fechaActual('es', 'dddd Do [de] MMMM [del] YYYY [a las] h:mm:ss A')); //Fecha actual en español.
console.log(reezutils.fechaActual('en', 'MMMM Do dddd [of] YYYY [at] h:mm:ss A')); //Fecha actual en inglés.

obtenerEmoji()

obtenerEmoji() te permite obtener un emoji de algún servidor. (SOLO discord.js)

Ejemplo:

//Importa el módulo discord.js (npm i discord.js --save)
const Discord = require('discord.js');

//Crea el cliente.
const client = new Discord.Client();

//Importa el módulo reezutils.
const reezutils = require('reezutils');

client.on('message', async (message) => {
    if (message.content == 'emoji') {
        //Hace un message.channel.send() de la función obtenerEmoji() para obtener un emoji.
        message.channel.send(reezutils.obtenerEmoji('miguel', client, '123456789098765432')); //Emoji de miguel.
    }
});

Sobre el creador:

reezutils creado por Anventec.

Discord: Anventec#0409

Twitter: @anventec

Importante:

Si encuentras algún bug o tienes un error, contacta con el creador por medio de sus redes sociales.

PD: Aún se está trabajando en el módulo para añadir más funciones.