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

pensador-api

v1.0.1

Published

Pensador é um pacote Node que traz frases de pensadores

Readme

pensador-api

Um pacote Node.js para buscar frases do Pensador.com.

Instalação

npm install pensador-api
# ou
yarn add pensador-api

Uso

const pensador = require("pensador-api");

// Buscar frases por termo
const result = await pensador({ term: "Fernando Pessoa", max: 3 });

// Buscar frases curtas (padrão, sem term)
const result = await pensador({ max: 5 });

Nota: a função é assíncrona — use async/await ou Promises.

Exemplo de retorno

{
  "total": 3,
  "searchTerm": "frases_de_fernando_pessoa",
  "phrases": [
    {
      "author": "Fernando Pessoa",
      "text": "Não sou nada. Nunca serei nada. Não posso querer ser nada."
    },
    {
      "author": "Fernando Pessoa",
      "text": "A arte é a expressão da nossa experiência real."
    },
    {
      "author": "Fernando Pessoa",
      "text": "Tudo vale a pena se a alma não é pequena."
    }
  ]
}

Opções

| Opção | Tipo | Obrigatório | Padrão | Descrição | | ------ | ------- | ----------- | --------------- | ---------------------------------------------------------------------------------------- | | term | string | não | frases_curtas | Autor ou tema a pesquisar. O prefixo "frases de" é adicionado automaticamente. | | max | integer | não | sem limite | Número máximo de frases a retornar. Omita para buscar todas as disponíveis para o termo. |

Resposta

| Campo | Tipo | Descrição | | ------------ | ------- | --------------------------------------------------------- | | total | integer | Quantidade de frases retornadas. | | searchTerm | string | Slug utilizado na busca (gerado a partir do term). | | phrases | array | Lista de objetos com author (string) e text (string). |

⚠️ Disclaimer

Este pacote funciona fazendo scraping do site Pensador.com. Por isso:

  • O funcionamento depende inteiramente da disponibilidade e da estrutura HTML do Pensador.com. Mudanças no site podem quebrar o pacote.
  • O uso deste pacote está sujeito aos Termos de Uso do Pensador.com. Consulte-os antes de utilizar em produção.
  • Este pacote não é oficial e não é mantido nem afiliado ao Pensador.com.
  • Use com responsabilidade: evite requisições excessivas que possam sobrecarregar o serviço.

Licença

MIT