2.1.1 • Published 8 months ago

hw_print_package v2.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
8 months ago

hw_print_package šŸš€

A simple and customizable Node.js utility function to print messages and optionally log the function itself. Perfect for testing or creating lightweight debugging tools. šŸ’»šŸ”§

Installation šŸ“¦

To install the package, run:

npm install hw_print_package

Usage šŸ› ļø

Importing the Package šŸŽ‰

You can use the package by importing it into your project:

const testing = require('hw_print_package');

Basic Usage šŸ“

By default, the function logs itself and returns the message 'hello world' šŸŒ:

const result = testing();
console.log(result); // Output: 'hello world'

Customization ✨

Want to change the message? No problem! You can provide a custom message instead of the default 'hello world' šŸ—£ļø:

function testing(customMessage) {
  console.log(testing);
  return customMessage || 'hello world'; // Custom message if provided
}

module.exports = testing;

Function Documentation šŸ“š

testing() šŸ’”

Description:

The testing() function logs the function definition itself (console.log(testing)) and returns either a custom message or the default message 'hello world'. It's a fun and simple tool to play around with logging and testing. šŸŽ®

Parameters:

  • customMessage (optional): A string to return instead of the default 'hello world'. If not provided, it defaults to 'hello world'.

Example:

const result = testing('Custom message');
console.log(result); // Output: "Custom message"

License šŸ›”ļø

ISC License


Author šŸ–‹ļø

King Grey šŸ’„


Changelog šŸ”„

v2.0.0

  • Refactored the function to support custom messages. šŸŽ‰
  • Added detailed function documentation. šŸ“
  • Improved logging for better debugging and fun! šŸŽ®

✨ Thanks for using hw_print_package! Have fun testing and coding! šŸš€

2.1.1

8 months ago

2.0.1

8 months ago

2.0.0

8 months ago

1.0.0

8 months ago