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

@stencitecnologia/constants

v0.1.0

Published

Shared constant collections and enums (Brazilian states, statuses, genders, document types, etc.).

Readme

@stencitecnologia/constants

Coleção compartilhada de constantes, enums e arrays de lookup (estados brasileiros, status de agendamento, gêneros, tipos de documento etc.). JavaScript puro, sem dependências e sem framework.

Instalação

npm install @stencitecnologia/constants

Não possui peer dependencies.

Uso

import {
  STATES,
  GENDERS,
  getStatusLabel,
  isFinalStatus,
} from '@stencitecnologia/constants';

// Opções para um dropdown
// <BaseSelect :options="STATES" option-label="label" option-value="value" />

// Label em português a partir da chave de status
const label = getStatusLabel(appointment.status); // "Confirmado"

// Verificação de grupo de status
if (isFinalStatus(appointment.status)) {
  // Atendimento já finalizou (FINISHED, MISSED, UNSUCCESSFUL, ...)
}

Referência

Status de agendamento

Constantes string canônicas para uso em todo o app:

AVAILABLE | BLOCKED | CONFIRMED | FINISHED | IN_ATTENDANCE | MISSED
PATIENT_CANCELED | PAYMENT | PROFESSIONAL_CANCELED | REPORT
RESCHEDULED | SCHEDULED | SCREENING | UNSUCCESSFUL | WAITING

| Export | Tipo | Descrição | |---|---|---| | STATUS_LABELS | Record<string, string> | Mapa chave → label em português. | | BOOKED_STATUSES | string[] | Status que indicam agendamento ativo (SCHEDULED, CONFIRMED, RESCHEDULED, ...). | | CANCELLED_STATUSES | string[] | Status de cancelamento. | | ACTIVE_STATUSES | string[] | Status em andamento (IN_ATTENDANCE, PAYMENT, SCREENING, ...). | | FINAL_STATUSES | string[] | Status finais (FINISHED, MISSED, UNSUCCESSFUL, ...). |

Helpers:

| Função | Assinatura | Descrição | |---|---|---| | getStatusLabel | (status: string) => string | Label em português; retorna o próprio status se não encontrado. | | isBookedStatus | (status: string) => boolean | Pertence a BOOKED_STATUSES. | | isCancelledStatus | (status: string) => boolean | Pertence a CANCELLED_STATUSES. | | isActiveStatus | (status: string) => boolean | Pertence a ACTIVE_STATUSES. | | isFinalStatus | (status: string) => boolean | Pertence a FINAL_STATUSES. |

Arrays de lookup

Todos no formato Array<{ label: string, value: string }>, prontos para usar como options em selects. Todos são Object.freeze()d — não mute, espalhe (...) ou use .map para gerar uma cópia.

| Export | Conteúdo | |---|---| | ENTITY_TYPES | Pessoa física (person) / Pessoa jurídica (company). | | GENDERS | Masculino (male) / Feminino (female). | | IDENTITY_TYPES | CPF (cpf) / CNPJ (cnpj). | | STATES | 27 UFs brasileiras (AC, AL, AP, ..., SP, SE, TO). |

Restrições

  • Pacote sem dependências de runtime. Nunca adicionar imports de vue, axios, dayjs ou qualquer outra biblioteca.
  • Os arrays exportados são imutáveis (Object.freeze). Para uma versão modificada, gere uma cópia com spread ou .map.