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

@techous/rainbowjs

v2.0.0

Published

Node/Deno JS Minimalist Library for making colorful terminal experiences.

Downloads

1

Readme

Node/Deno JS Minimalist Library for making colorful terminal experiences.

GitHub release (latest by date) GitHub package.json version GitHub code size in bytes GitHub last commit npm

Features

  • Minimalist library to add colors to terminal
  • No need to learn hexadecimal color codes
  • Print alphabets on terminal easily using Alphabet library
  • Supports Deno JS from GitHub and NPM registry
  • Smallest library to build terminal based JS Games

Installation

yarn add @techous/rainbowjs
# or
npm install @techous/rainbowjs

Quick Setup

For quickly using this library you can follow the below commands

# clone the repository
git clone https://github.com/TechOUs/rainbowjs.git

# After this you will get a folder (js module) that you can use in your project

Core Usage

We support the core Rainbow Library for nodejs and denojs mainly

Node JS

// Method 1 : Create Rainbow module object to access the functions
const Rainbow = require('@techous/rainbowjs');
// Use Rainbow.<METHOD>
console.log(Rainbow.checkFormat('blink'));
// OUTPUT : true

// Method 2 : Use function names directly which you want to import
const {checkFormat} = require('#techous/rainbowjs');
console.log(checkFormat('blink'));
// OUTPUT : true

Deno JS

// Method 1: Use code directly from github
import {
    checkFormat
} from 'https://raw.githubusercontent.com/TechOUs/rainbowjs/master/src/deno/index.js'
console.log(checkFormat('blink'));
// OUTPUT : true

// Method 2: Use code from npm package cdn
import {
    checkFormat
} from 'https://cdn.skypack.dev/@techous/rainbowjs/deno';
console.log(checkFormat('blink'));
// OUTPUT : true

Alphabet Library Support (Supported from 2.0.0)

We added this new library in version 2.0.0 to print the Alphabets easily on the terminal that reduces the time to print the alphabets again and again

Node JS

// Method 1 : Create Rainbow module object to access the functions
const Alphabet = require('@techous/rainbowjs/Alphabet');
// Use Alphabet.<METHOD>
Alphabet.printString('#', 'Tests', '  ');
// OUTPUT
// #####   ###    ##   #    ##
//   #    #   #  #    ###  #
//   #    #####   #    #    #
//   #    #        #   #     #
//   #     ####  ##    ##  ##

// Method 2 : Use function names directly which you want to import
const {printString} = require('@techous/rainbowjs/Alphabet');
printString('#', 'Tests', '  ');
// OUTPUT
// #####   ###    ##   #    ##
//   #    #   #  #    ###  #
//   #    #####   #    #    #
//   #    #        #   #     #
//   #     ####  ##    ##  ##

Deno JS

// Method 1 : Use the code directly from github
import {
    getString, 
    printString
} from 'https://raw.githubusercontent.com/TechOUs/rainbowjs/master/src/deno/Alphabet.js'
printString('#', 'Tests', '  ');
// OUTPUT
// #####   ###    ##   #    ##
//   #    #   #  #    ###  #
//   #    #####   #    #    #
//   #    #        #   #     #
//   #     ####  ##    ##  ##

// Method 2 : Using npm cdn 
import {
    getString,
    printString
} from 'https://cdn.skypack.dev/@techous/rainbowjs/deno/Alphabet.js'
printString('#', 'Tests', '  ');
// OUTPUT
// #####   ###    ##   #    ##
//   #    #   #  #    ###  #
//   #    #####   #    #    #
//   #    #        #   #     #
//   #     ####  ##    ##  ##

Documentation

Coming Soon!

Contribution

For contribution guidelines please follow this guide

LICENSE

GitHub