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

@kurumi30/typewriter-ts

v1.0.4

Published

Uma biblioteca de animação de digitação usando TypeScript

Downloads

16

Readme

Typewriter-ts

Npm package version Npm package total downloads install size npm bundle size MIT License

  • Uma simples animação de digitação para você colocar nos seus projetos frontend 🙂
  • Leve e fácil de usar 🚀
  • Feito apenas com

Instalação

# npm
npm install @kurumi30/typewriter-ts

# pnpm
pnpm add @kurumi30/typewriter-ts

# yarn
yarn add @kurumi30/typewriter-ts

Exemplo

<!-- No HTML -->
<div id="test"></div>
// No JavaScript ou TypeScript

import Typewriter from '@kurumi30/typewriter-ts'
// ou se você estiver usando CommonJS:
// const Typewriter = require('@kurumi30/typewriter-ts')

const test = document.querySelector('#test')
const typewriter = new Typewriter(test, {
  loop: true,
  typingSpeed: 70,
  deletingSpeed: 50,
  cursorColor: 'rgb(255, 0, 0)' // suporta qualquer formato (hex, rgb, etc)
})

typewriter
  .typeString('Hello World!')
  .pauseFor(1000)
  .deleteChars(6)
  .pauseFor(1000)
  .typeString('Typewriter-ts')
  .pauseFor(1000)
  .deleteAll(10)
  .start()

Parâmetros

new Typewriter(element: HTMLElement, {
  loop: boolean,
  typingSpeed: number,
  deletingSpeed: number,
  cursorColor: string,
})

| Parâmetro | Descrição | Padrão | Obrigatório | |-----------------|---------------------------------------|--------|-------------| | element | Elemento HTML para a animação. | | Sim | | loop | Se a animação deve repetir ou não. | false| Não | | typingSpeed | Velocidade de digitação. | 50 | Não | | deletingSpeed | Velocidade para apagar. | 50 | Não | | cursorColor | Cor do cursor. | black| Não |

Métodos

| Método | Descrição | Parâmetros | |----------------|----------------------------------------|-----------------------| | typeString | Adiciona um texto para ser digitado. | str: string | | deleteChars | Apaga uma quantidade de caracteres. | num: number | | deleteAll | Apaga todo o texto. | deleteSpeed: number | | pauseFor | Pausa a animação por um tempo. | time: number | | start | Inicia a animação. | |

Créditos

Contribuição

Se você quiser contribuir com o projeto, fique à vontade para abrir uma issue ou pull request. Toda ajuda é sempre bem-vinda! 💻