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

ruxe

v1.2.6

Published

format strings into paragraphs along with text styling.

Downloads

76

Readme

About

Ruxe is an open-source npm package used to wrap text into clean and neat paragraphs for command line interfaces. It takes 2 lines of code to do that. And saves you a lot of time for formatting text. You can also change paragraph colors and change the alignment of the paragraph in seconds.

Installation

npm install ruxe

Parameters

The wrap() function requires atleast 1 parameter. And maximum of 2 parameters. The first parameter is the string that you would like to turn into a paragraph. And the second parameter is a configeration object consisting of at most 3 fields. Which are - color - Textcolor of the paragraph :string: align - Alignment format of the paragraph :string: wordsPerLine - Words after which a new line is created :number: By default color parameter is treated as white, the align parameter is treated as left and wordsPerLine is treated as 13 Available Colors: black, red, green, yellow, blue, magenta, cyan and white Available Alignment Formats: left, right and center

Example Usage

const wrap = require("ruxe");

let textwrapped = wrap("Harry has a little farm, he has 4 cows, 15 chickens and 3 goats in his farm. He likes to grow a variety of crops such as wheat, barley, rice and corn! He loves farming! He also has good storage facilities in the farm and modern irrigation systems!", { color:"cyan", wordsPerLine:8, align:"left" }); 

console.log(textwrapped); //each line of he paragraph will have 8 words, text color will be cyan in color and alignment of the paragraph will be left.

Output:

Harry has a little farm, he has 4 cows,
15 chickens and 3 goats in his farm.
He likes to grow a variety of crops
such as wheat, barley, rice and corn! He
loves farming! He also has good storage facilities
in the farm and modern irrigation systems!

For more examples click me!

🤝 Contribution

For contributing to this project, fork the repository here, make the changes and open a pull request! Pull requests will be reviewed before being merged.

Format

Your pull request must contain the following information in detail -

  • Explain the pull request and the need for it to be merged in not more than 30 words
  • What did you add/edit?

Review

All pull requests are reviewed thoroughly. Pull requests that pass the review are merged and then closed while the pull requests that fail the review are not merged and are closed.

🐛 Bugs

Found a bug? Having an issue with the package? Open a new issue here!