You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@apochromat/animation

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apochromat/animation

Dynamic text animations for interactive command line apps.

0.1.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

@apochromat/animation

Dynamic text animations for interactive command line apps.

Installation

npm install @apochromat/animation --save

Usage

import {AnimationLens} from '@apochromat/animation';
import {print} from '@apochromat/print';
import {Lens} from 'apochromat';

const greeting = new Lens();
const spinner = new AnimationLens();

print(greeting);
greeting.render`Hello, World! ${spinner}`;
spinner.startAnimation(['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'], 80);
setTimeout(() => greeting.render`Hello, World!`, 2000);
Hello, World! ⠋
Hello, World! ⠴
Hello, World!

Types

class AnimationLens extends Lens {
  startAnimation(frames: readonly string[], interval: number): () => void;
}

Copyright 2021 Clemens Akens. All rights reserved. MIT license.

FAQs

Package last updated on 22 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts