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 🙏

© 2024 – Pkg Stats / Ryan Hefner

spanish-quotes

v2.2.2

Published

A simple NPM Package which returns quotes in spanish.

Downloads

57

Readme

spanish quotes | frases en español

NPM package to get spanish quotes.

Paquete NPM para obtener frases en español.

Quickstart | Inicio rápido

Globally | Globalmente

Install | Instalar

npm i -g spanish-quotes --save

Usage | Uso

Run with installation:

Ejecutar con instalación:

spanish-quotes

Run without installation:

Ejecutar sin instalación:

npx spanish-quotes

Result:

Resultado:

La historia decía que era prisionera, pero eso no era cierto, porque ella tenía esperanza y cuando hay esperanza no eres prisionero de nadie.
 -- Despereaux: un pequeño gran héroe

Locally | Localmente

Install | Instalar

npm i spanish-quotes --save

Import | Importar

ES Module

Set "type": "module" in the package.json or use the .mjs extension:

Establecer "type": "module" en el package.json o usar la extensión .mjs:

{
  "type": "module"
}
import { getAllQuotes, getDailyQuote, getRandomQuote } from 'spanish-quotes';

console.log(getAllQuotes());
console.log(getDailyQuote());
console.log(getRandomQuote());
CommonJS
import('spanish-quotes').then(({ getAllQuotes, getDailyQuote, getRandomQuote }) => {
  console.log(getAllQuotes());
  console.log(getDailyQuote());
  console.log(getRandomQuote());
});

Usage | Uso

  • getDailyQuote(year?: number, month?: number, date?: number)

Function that returns the daily quote. If year, month or date are undefined, then uses today as the consult date. Month starts in 0:

Función que retorna la frase del día. Si year, month o date son undefined, entonces se usa hoy como la fecha de consulta. Month comienza en 0:

getDailyQuote();

getDailyQuote(2021, 0, 1);

Result:

Resultado:

{
  "quote": "La historia decía que era prisionera, pero eso no era cierto, porque ella tenía esperanza y cuando hay esperanza no eres prisionero de nadie.",
  "from": "Despereaux: un pequeño gran héroe"
}
  • getRandomQuote()

Function that returns a random quote:

Función que retorna una frase aleatoria:

getRandomQuote();

Result:

Resultado:

{
  "quote": "La historia decía que era prisionera, pero eso no era cierto, porque ella tenía esperanza y cuando hay esperanza no eres prisionero de nadie.",
  "from": "Despereaux: un pequeño gran héroe"
}
  • getAllQuotes()

Function that returns all the quotes:

Función que retorna todas las frases:

getAllQuotes();

Result:

Resultado:

[
  {
    "quote": "La historia decía que era prisionera, pero eso no era cierto, porque ella tenía esperanza y cuando hay esperanza no eres prisionero de nadie.",
    "from": "Despereaux: un pequeño gran héroe"
  }
]

Want to help? | ¿Quiere ayudar?

Want to file a bug, contribute some code, or improve documentation? Thanks! Feel free to contact me at @davidvives or at [email protected].

¿Quiere reportar un error o una pulga, contribuir con código o mejorar la documentación? ¡Muchas gracias! Puede contactarme a @davidvives o a [email protected].