Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Ruxe is an open-source npm package used to wrap text into 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.
npm install ruxe
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
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!
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.
Found a bug? Having an issue with the package? Open a new issue here!
FAQs
format strings into paragraphs along with text styling.
The npm package ruxe receives a total of 37 weekly downloads. As such, ruxe popularity was classified as not popular.
We found that ruxe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.