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

open-cvt

v0.0.2

Published

CVT Schema Validation

Downloads

22

Readme

Open CVT

Uma biblioteca de validação para arquivos de currículo no formato CVT (Curriculum Vitae Template).

Instalação

npm install open-cvt

ou

yarn add open-cvt

Uso

import { validate, Curriculum } from 'open-cvt';

// Validar conteúdo de um arquivo CVT (formato JSON)
const cvtContent = JSON.stringify({
  "meta": {
    "formatVersion": "1.0.0",
    "language": "pt"
  },
  "basics": {
    "name": "João Silva",
    "email": "[email protected]"
  }
});

// Validar o conteúdo
const errors = validate(cvtContent);

if (errors === null) {
  console.error('Erro ao fazer o parsing do arquivo CVT');
} else if (errors.length === 0) {
  console.log('Currículo válido!');
} else {
  console.log('Erros de validação encontrados:');
  errors.forEach(error => console.log(`- ${error}`));
}

Formato CVT

O formato CVT é um objeto JSON estruturado com as seguintes seções principais:

Seções Obrigatórias

  • meta: Informações sobre o documento

    • formatVersion: Versão do formato CVT
    • createdAt: Data de criação do documento
    • language: Idioma do currículo
  • basics: Informações pessoais e de contato

    • name: Nome completo
    • label: Cargo ou função
    • summary: Resumo profissional
    • identifiers: Documentos de identificação
    • location: Endereço
    • profiles: Redes sociais e perfis profissionais

Seções Opcionais

  • work: Experiências profissionais
  • education: Formação acadêmica
  • certifications: Certificações
  • skills: Habilidades e competências
  • volunteer: Trabalho voluntário
  • awards: Premiações
  • publications: Publicações
  • interests: Interesses
  • references: Referências

Exemplo Completo

{
  "meta": {
    "formatVersion": "1.0.0",
    "createdAt": "2024-04-15T16:41:14-03:00",
    "language": "pt"
  },
  "basics": {
    "name": "João Silva",
    "label": "Desenvolvedor de Software",
    "summary": "Profissional com experiência em desenvolvimento web...",
    "location": {
      "city": "São Paulo",
      "countryCode": "BR"
    }
  },
  "work": [
    {
      "organization": "Empresa Exemplo",
      "position": "Desenvolvedor Frontend",
      "startDate": "2022-01-01T00:00:00-03:00"
    }
  ]
}

API

validate(cvtContent: string): string[] | null

Valida o conteúdo de um arquivo CVT contra o esquema padrão.

  • Parâmetros:
    • cvtContent: O conteúdo do arquivo CVT como string (formato JSON)
  • Retorno:
    • Um array de mensagens de erro (vazio se for válido)
    • null se ocorrer um erro durante o parsing

Tipos exportados

A biblioteca também exporta interfaces TypeScript para trabalhar com dados de currículo:

import { Curriculum, Work, Education } from 'open-cvt';

// Usar os tipos em seu código
const meuCurriculo: Curriculum = {
  // ...
};

Desenvolvimento

Configuração

git clone https://github.com/seu-usuario/open-cvt.git
cd open-cvt
npm install

Scripts

  • npm run build: Compila o código TypeScript
  • npm test: Executa os testes

Licença

MIT