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

sky-cli-helper

v1.1.5

Published

This is can use cli colorful easy

Downloads

17

Readme

Owned by Seokkyu Yoon

  • support es5, es6, and ts
  • use cli colorful easy way based on chainging
  • calculate decimal rgb color and hex rgb color to ansi 211 color

description

  • Static(true / false) means can use like SkyCliHelper.{static method}

Clone (Static: false)

  • Make clone you defined
const yellowPrinter = SkyCliHelper.Text.Foreground.Yellow
yellowPrinter.println("It's yellow text")

const italicYellowPrinter = yellowPrinter.Clone.Text.Italic
const boldItalicYellowPrinter = italicYellowPrinter.Clone.Text.Bold

italicYellowPrinter.println("It's yellow italic text")
boldItalicYellowPrinter.println("It's yellow italic bold text")

Text (Static: true)

  • Styling text collection |attribute|description| |--|--| |Reset|Reset text styles| |Bold|Make text bold| |Italic|Make text italic| |Underline|Make text has underline| |Foreground|Styling text color of foreground| |Background|Styling text color of background|

    Foreground and Background

    | attribute | description | | --------- | ---------------------- | | Red | Make color red | | Green | Make color green | | Blue | Make color blue | | Pink | Make color pink | | Cyan | Make color cyan | | Yellow | Make color yellow | | White | Make color white | | Gray | Make color gray | | Rgb | choose decimal and hex |

    Rgb

    | attribute | description | | ---------------------------------------------------------------------- | ------------------------------------------ | | decimal(red: number(0-255), green: number(0-255), blue: number(0-255)) | Make ansi color based on decimal rgb color | | hex(code: string(/^#[0-9|a-f|A-F]{3,6}$/)) | Make ansi color based on hex rgb color |

    • example
      SkyCliHelper.Text.Foreground.Rgb.decimal(0, 0, 0)
        // it's same with #ffffff
        .Text.Background.Rgb.hex('#fff')
        .println("It's black text and background is white")

Cursor (Static: true)

  • If you need to handle cursor use this | attribute | description | | ----------------- | ------------------------------------ | | Up | Cursor moves to up once | | Down | Cursor moves to down once | | Right | Cursor moves to right once | | Left | Cursor moves to left once | | FirstColumn | Move to first column of current line | | Hide | Hide cursor | | Show | Show cursor | | RemoveAfter | Remove after cursor texts | | ups(n: number) | Cursor moves to up n times | | downs(n: number) | Cursor moves to down n times | | rights(n: number) | Cursor moves to right n times | | lefts(n: number) | Curosr moves to left n times |

print(...text: string[]):void (Static: true)

  • Write text and cursor positioned at end of text
SkyCliHelper.print('abc')

// will be result
// abc|
//    ^ cursor is here

println(...text: string[]):void (Static: true)

  • Write text and cursor positioned next line
SkyCliHelper.println('def')

// will be result
// abc
// | <- cursor is here

input(inputPrinter?: SkyCliHelper):Promise<string> (Static: true)

  • inputPrinter make user input to style of printer
const answer = await SkyCliHelper.input(
  SkyCliHelper.Text.Foreground.Rgb.decimal(130, 255, 180),
)

// answer will be input
// if use input similaility rgb color text will input

select(items: string[], options: { idx?: number; vertical?: boolean; selectPrinter?: SkyCliHelper; unselectPrint?: SkyCliHelper} = {}) (Static: true)

  • select items to arrow input and enter
  • items are selectable texts
  • options.idx is default idx of item (default: 0)
  • if options.vertical is true show vertical else horizontal (default: false)
  • options.selectPrinter make cursored text to style of printer
  • options.unselectPrinter make uncursored text to style of printer
const answer = await SkyCliHelper.select(['Yes', 'No'])

// answer will be { idx: {selectedItemIdx}, item: {selectedItem} }

multipleSelect(items: string[], options: { idx?: number; vertical?: boolean; cursorPrinter?: SkyCliHelper; selectPrinter?: SkyCliHelper; unselectPrint?: SkyCliHelper} = {}) (Static: true)

  • mostly like select
  • options.cursorPrinter make cursored text to style of printer
  • options.selectPrinter make selected text to style of printer
  • options.unselectPrinter make unselected text to style of printer
const answer = await SkyCliHelper.select(['Python', 'Java', 'Javascript'])

// answer will be Array of select result