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

infinite-tape

v1.1.4

Published

The package provides full implementation of a simulated infinite tape, allowing complex read and write operations. It's ideal for developers working on theoretical computer science projects, automated testing and visualization of tape-based operations.

Downloads

21

Readme

:infinity: Infinite Tape

👋 Introduction

The Infinite Tape module represents a virtual tape, which can theoretically animate to infinity.

On the other hand, the Odometer Tape module is designed to represent values in a way similar to the mechanical odometer device. It provides efficient digit management and rolling animation capabilities. :recycle:

Infinite Tape

Example page can be accesed with this link.

:wrench: Custom Software Development and Consulting

If you find this project helpful and need assistance with a custom job, or if you require a more tailored solution for your specific use case, I would be glad to help! I offer consulting and software development services in TypeScript, JavaScript, and a variety of other technologies. Here's what you can expect:

  • :gear: Developing complex, robust, and secure software applications
  • :hammer_and_wrench: Customizing and optimizing existing code
  • 📖 Professional consulting and advice tailored to your needs
  • :stars: And much more!

Contact me at:

:blue_heart: Support the Project

If you find this project useful and want to show some appreciation, consider supporting me:

Your support helps me maintain and improve this project. Thank you!

:cd: Installation

Using npm:

npm i -g npm
npm i --save infinite-tape

:hammer_and_wrench: Usage

♾️ Infinite Tape

  1. Infinite Tape is imported directly from package root path.
import {InfiniteTape} from "infinite-tape";
  1. Create a configuration object for the InfiniteTape class. All units are connected to the utils.unit unit.
const infiniteTapeConfiguration = {
        itemHeight: 2,
        utils: {
            unit: 'rem', // rem | em
            textSize: 16, // px
        },
        timeOfTranslation: 1000, // ms
        incrementBy: 10,
    }
  1. Create a new object from InfiniteTape(tapeId, wrapperId, configuration) class.
const infiniteTape = new InfiniteTape("infiniteTapeTape", "infiniteTapeBox", infiniteTapeConfiguration);
  1. Animate the tape to the new value.
infiniteTape.animateTo(45);
  1. Infinite Tape has a custom event infiniteTapeCurrentValue. You can listen to changes with:
document.addEventListener("infiniteTapeCurrentValue", (e) => {
        console.log(e.detail.value);
    });
  1. Add two div elements with desired ids, which need to be passed to class constructor. You must set width and height to the outer div. Note that height is limited to 9 * height of one box item, if you use height measures such as %, vh be careful because the inner tape can overflow. If height does not exceed the limited value you can use %, vh with ease.
<div id="infiniteTapeBox">
    <div id="infiniteTapeTape"></div>
</div>

0️⃣ Odometer

Odometer currently does not support negative values.

  1. Odometer is imported directly from package root path.
import {OdometerTape} from "infinite-tape";
  1. Create a configuration object for the InfiniteTape class. All units are connected to the utils.unit unit.
const odometerConfiguration = {
        itemHeight: 2,
        utils: {
            unit: 'rem', // rem | em
            textSize: 16, // px
        },
        timeOfTranslation: 1000, // ms
    }
  1. Create a new object from OdometerTape(tapeId, wrapperId, configuration) class.
const odometerTape = new OdometerTape("odometerTapeTape", "odometerTapeBox", odometerConfiguration);
  1. Animate the tape to the new value.
odometerTape.animateTo(9);
  1. Odometer has a custom event odometerCurrentValue. You can listen to changes with:
document.addEventListener("odometerCurrentValue", (e) => {
        console.log(e.detail.value);
    });
  1. Add two div elements with desired ids, which need to be passed to class constructor. You must set width and height to the outer div. Note that height is limited to 9 * height of one box item, if you use height measures such as %, vh be careful because the inner tape can overflow. If height does not exceed the limited value you can use %, vh with ease.
<div id="odometerTapeBox">
    <div id="odometerTapeTape"></div>
</div>

🎨 Styling

Styling the elements is achieved with overriding css ids and classes. There are 3 major elements to override:

  • box
  • tape
  • tape item can be overwritten with class box-item

The first two elements are overwritten with your desired ids which you had to set at initialization of the elements.