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

typewrite-directive

v1.0.0

Published

an easy to use and jQuery-free Angular 1.x directive

Downloads

10

Readme

This is just a graphical effect of someone typing sentences on your page. This directive allow you to pass a string or an array of strings in the "sentences" attribute (behavior is explained later). Since is restricted to attributes, it can be applied to any (empty) tag you want. Is slightly configurable through some attributes:

  • [boolean] randomize: define if the sentence to type has to be defined randomly or following the array sequence (default: false)
  • [integer - ms] type-delay: specifies the delay between each letter (default: 150ms)
  • [integer - ms] erase-delay: specifies the delay between the tipyng of the last letter and the beginning of the canceling (default: 3000ms)
  • [integer - ms] initial-delay: specifies the delay of the beginning of typing when the displayed string is empty (default: 750ms)
  • [char] cursor: specifies the typing cursor (default: '|')
  • [boolean] new-line: set typewriter to clear the line at the end of each sentense (waits the erase-delay, of course)(default: false)
  • [integer] humanize: espress the variabily percentage of the typing delay(default: 0)

Installation: import typewriter.js and typewriter.css in your project and add "phox.typewriter" module to your angular module dependencies

<div typewriter sentences="sequence"></div>

If you pass a string, that will be typed just one time and de cursor will be removed at the end

<div typewriter sentences="single_sentence"></div>

You can ask to randomize the sentences in the array to let the user display a new sentence at each page reload

<div typewriter sentences="sentences" randomize="true"></div>

You can ask to type faster, specifing a type delay lower than the default one (150ms)

<div typewriter sentences="sentences" type-delay="50"></div>

You can ask to type slower, specifing a type delay higher than the default one (150ms)

<div typewriter sentences="sentences" type-delay="300"></div>

You can set a different cursor character (default : '|')

<div typewriter sentences="sentences" cursor="▊"></div>

Setting 'new-line' attribute to true, typewriter will clear the line at the end of each sentence (default: false)

<div typewriter sentences="sentences" new-line="true"></div>

You can specify a varibility percentage to make the writing more human-like.

<div typewriter sentences="humanize" humanize="30"></div>