![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A generator of smart, pretty, and organized output for Node/JS scripts in the terminal
rejoinder
/rɪˈdʒɔɪndə/
noun
a reply or response to a question or remark, esp a quick witty one; retort
Rejoinder is a generator of smart, pretty, and organized output on the console for Node/JS scripts, with optimizations
for executing shell commands. It leverages colors and the like using the colors package
and makes life easier when executing CLI instructions with shelljs. ShellJS and
any CLI extensions are not required, however! Check out lib/Echo/EmitStrategy
if you're curious :)
Super awesome when paired with inquirer and/or commander!
Also does children's parties.
Note that rejoinder requires Node.js version >=5.x (including ^6) but does NOT depend on use of the --harmony flag!
npm install rejoinder
If you want support from shelljs (required to use Execute
), install that too:
npm install shelljs
const rejoinder = require('rejoinder');
let echo = rejoinder.echo;
let execute = rejoinder.execute;
echo.now('output this very important warning to the console with pretty colors'.formatAsWarning()); // colorful output
echo.withPostfix.warn('output this very important warning to the console with pretty colors'); // colorful output prefixed with the string "WARN "
echo.beVerbose = true; // beVerbose fka "debugMode"
echo.ifVerbose('Some message will appear if beVerbose is true');
echo.ifDebug('Some debug message will appear if beVerbose is true prefixed with the string "DEBUG "');
echo.beVerbose = false; // it is false by default
echo.ifVerbose('Some message will NOT appear if beVerbose is false!');
echo.ifDebug('Some debug message will NOT appear if beVerbose is false!');
echo.if(somethingistrue, 'I spit only the truth!'.formatAsSuccess()); // also returns false if somethingistrue is false
echo.now('all', 'my', 'methods', 'are', 'also', 'variadic!'); // prints "all my methods are also variadic!"
echo.if(true, 'even', 'this', 'one :)'); // prints "even this one :)"
echo.prefix = '>>'; // this will be printed directly before the message every time
echo.now('changed', 'the', 'game!'); // prints ">> changed the game!"
echo.prefix = 'Big:Boy:Time:';
echo.messageSeparator = '||'; // this is the thing between the prefix and the message
echo.usingPredicate((str) => `"${str}"`, 'the', 'time', 'for', 'fun and games is', 'over!');
// the above prints `Big:Boy:Time:||"the" "time" "for" "fun and games is" "over!"`
echo.withPostfix('postfix', 'this is', 'pretty cool'); // prints "Big:Boy:Time::postfix||this is pretty cool"
echo.postfixSeparator = '<>'; // this is the thing between the prefix and the postfix. It goes `prefix + postfixsep + postfix + msgsep + message`
echo.withPostfix('postfix', 'this too'); // prints "Big:Boy:Time:<>postfix||this too"
echo.withPostfix.ok('GOT IT!'); // prints colorful output that says "Big:Boy:Time:<>OK||GOT IT!"
echo.withPrefix('~>', () => // ONLY the echo statements that appear inside of this function will have the aforesaid prefix
{
echo.now('or'); // prints "~>||or"
echo.now('is', 'it? I wonder.'); // prints "~>||is it? I wonder."
echo.withPostfix('NO', 'Wait!'); // prints "~><>NO||Wait!"
echo.withPostfix.action("Don't make me bring Execute into this..."); // prints colorful output "~><>ACTION||Don't make me bring Execute into this..."
});
echo.beVerbose = true;
execute.now('return 0'); // prints the command and the result of executing it thanks to echo.beVerbose! See API.md for more information on how this works
See API.md
npm install
npm test
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
FAQs
A tiny library for creating gorgeous terminal output
The npm package rejoinder receives a total of 86 weekly downloads. As such, rejoinder popularity was classified as not popular.
We found that rejoinder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.