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

@tyra/core

v0.2.8

Published

Biblioteca core da Tyra para projetos web

Readme

@tyra/core

npm version npm downloads License: MIT CI

Biblioteca core da Tyra para projetos web. Uma coleção de utilitários, constantes e helpers para facilitar o desenvolvimento de aplicações.

📦 Instalação

npm install @tyra/core

ou

yarn add @tyra/core

ou

pnpm add @tyra/core

🚀 Como Usar

Importação

// Utilitários e funções
import { capitalize, formatCurrency, HTTP_STATUS } from '@tyra/core';

// Componentes React
import { DevelopedBy } from '@tyra/core';

Utilitários

Formatação de Texto

import { capitalize, slugify, removeAccents } from '@tyra/core';

capitalize('tyra'); // 'Tyra'
slugify('Olá Mundo!'); // 'ola-mundo'
removeAccents('São Paulo'); // 'Sao Paulo'

Formatação de Valores

import { formatCurrency, formatDate } from '@tyra/core';

formatCurrency(1500.50); // 'R$ 1.500,50'
formatDate(new Date()); // '17/02/2026'

Helpers

import { delay, isObject } from '@tyra/core';

await delay(1000); // Aguarda 1 segundo
isObject({ name: 'Tyra' }); // true
isObject([1, 2, 3]); // false

Constantes

import { HTTP_STATUS, ERROR_MESSAGES, PATTERNS } from '@tyra/core';

// Status HTTP
console.log(HTTP_STATUS.OK); // 200

// Mensagens de erro
console.log(ERROR_MESSAGES.REQUIRED_FIELD); // 'Este campo é obrigatório'

// Padrões de validação
PATTERNS.EMAIL.test('[email protected]'); // true

Validadores

import { isValidCPF, isValidCNPJ, isValidEmail } from '@tyra/core';

isValidCPF('123.456.789-09'); // true
isValidCNPJ('11.222.333/0001-81'); // true
isValidEmail('[email protected]'); // true

Formatadores

import { formatCPF, formatCNPJ, formatPhone, maskEmail } from '@tyra/core';

formatCPF('12345678909'); // '123.456.789-09'
formatCNPJ('11222333000181'); // '11.222.333/0001-81'
formatPhone('11987654321'); // '(11) 98765-4321'
maskEmail('[email protected]'); // 'u***[email protected]'

Componentes React

import { DevelopedBy } from '@tyra/core';
import logo from './logo-dark.png';

function App() {
  return (
    <div>
      {/* Seu conteúdo */}
      
      <DevelopedBy 
        logo={logo}
        company="Tyra"
        url="https://tyra.com.br"
        variant="elegant"
      />
    </div>
  );
}

Com Logo Personalizado (v0.1.2+)

// Com logo e nome
<DevelopedBy 
  logo="/logo-dark.png"
  company="Tyra"
  url="https://tyra.com.br"
/>

// Apenas logo
<DevelopedBy 
  logo="/logo-dark.png"
  company=""
  url="https://tyra.com.br"
/>

// Logo com tamanho customizado
<DevelopedBy 
  logo="/logo-dark.png"
  logoHeight={32}
  company="Tyra"
/>

🛠️ Desenvolvimento

Pré-requisitos

  • Node.js 18+
  • npm, yarn ou pnpm

Scripts Disponíveis

# Instalar dependências
npm install

# Build da biblioteca
npm run build

# Modo de desenvolvimento (watch mode)
npm run dev

# Executar testes
npm run test

# Linting
npm run lint

Estrutura do Projeto

tyra-web/
├── src/
│   ├── index.ts          # Ponto de entrada principal
│   ├── utils/            # Utilitários
│   │   └── index.ts
│   └── constants/        # Constantes
│       └── index.ts
├── dist/                 # Build output (gerado)
├── package.json
├── tsconfig.json
└── README.md

📝 Publicação

Para publicar no npm:

  1. Faça login no npm:
npm login
  1. Publique a biblioteca:
npm publish --access public

Nota: Se você usar o escopo @tyra, certifique-se de ter permissões adequadas ou altere o nome no package.json.

🤝 Contribuindo

Contribuições são bem-vindas! Sinta-se à vontade para abrir issues e pull requests.

📄 Licença

MIT © Tyra

🔗 Links Úteis