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 🙏

© 2025 – Pkg Stats / Ryan Hefner

free-text

v2.0.0

Published

A library that allows you write like the Typed.js library but more simplest in any element of the DOM.

Downloads

15

Readme

free-text

A library that allows you write in any element of the DOM like the Typed.js library but more simple.

Example

To plunker example

Install

GitHub repository

You can get the content of the file index.js in ./dist or via NPM.

NPM:

   npm install free-text --save 

Getting started

Important: This library use jQuery. You need have installed jQuery for can use free-text library.

For this example we have a index.html file in the root of the proyect. We have put inner the HEAD tag of html body the link of this library.

<head>
    <!-- load jQuery -->
    <script src="jquery.js"></script>
    
    <!-- load free-text library -->
    <script src='./node_modules/free-text/index.js'></script>
</head>

Now we create a H1 tag in the body with an id to be able to find it.

<body>
    <h1 id='target'></h1>
</body>

And now, we write the code for instantiate a FreeText object which will does the magic. Only require invoke the autowriting function which needs receive a object as param. This object only require two properties:

  1. An array of strings with the words or sentences that it will writes.
  2. And a string of CSS selector type of the element (in this case '#target').

We write the script below of BODY tag.

<script>
       const FTX = new FreeText();
       //The autowriting method return the object that we need to make the animation.
       var autowriting = FTX.autoWriting({
           element:'#target',  //the CSS selector of the DOM element.
           words: ["I'm the first sentence", 'Hello word!', 'awesome'] //sentences or words that will do write
       }).start(); //the start function begin the animation.
</script>

API

FreeText Object

autoWriting( options )

Return the autoWriting object.

Options:

  • element: String. Css selector of the DOM element target. Require.
  • keepWord: Int. Time to stay the words, in milliseconds. Optional. Default: 800.
  • loop: Boolean. Indicates if this autowriting is a loop or not. Optional. Default: true.
  • words: Array. Array of strings that contained the words or sentences that autowriting will writes. Optional. Defauls: empty array.
  • speedDelete: Int. Speed to delete the letters, in millisecons. Optional. Default: 30.
  • speedWrite: Int. Speed to add the letters, in millisecons. Optional. Default: 100.
  • hideCursorToEnd: Boolean. Only has effect if param loop is false. Hides the cursor when autowriting object has written the array words complete. Optional. Default: true.

autoWriting object

Methods:

  • start(): Start the writing.
  • stop(): Freezes the writing.
  • continue() Remove the effect of stop().
  • clear(): Delete all the written.
  • setWords( [string] ): Set the words param.